There is a code that forwards messages from one group to another.
history = await tg_client(GetHistoryRequest(
peer=channel,
offset_id=0,
offset_date=None, add_offset=0,
limit=1, max_id=0, min_id=0,
hash=0))
messages = history.messages
if last_message_id != messages[0].id:
last_message_id = messages[0].id
print(str(messages[0].message))
await tg_client.send_message('user_id', str(messages[0].message+"\n\n\n sent by bot"))
But if there are pictures in the post, it ignores them and sends only the text, if there is no text, but only a picture, then it does not send anything. How can I make it send an image as well?
I tried to search the documentation for the option I needed, but I did not find anything similar.