1

So what im trying to do is get the chat a message was forwarded from, possibly all chats it went through in between if thats a thing. this is a slightly edited Program_ListenUpdates example

I tried doing this with fwd_from but it always has no values and prints blank

X--X
  • 11
  • 2

1 Answers1

0

message.fwd_from may be null if message is not a forward. If not null, it holds only limited information about the forward. Often you can't trace back to the source of the forward if it's not from a public channel.

In general, you can't obtain more information using Telegram Client API that you can obtain using the official Client apps.

So don't expect to be able to trace a message through all intermediate forwards (especially since nowadays it is possible to forward a message and mask the fact it is a forward)

Wizou
  • 1,336
  • 13
  • 24
  • hey i know and im not trying to do that im just trying to get the channel the message was forwarded from. I figured out how to use fwd_from i can get the channel ids and the original message ids but i cant figure out how to turn this into an InputChannel so i can interact with it, when fwd_from.save_from_peer is null everytime – X--X Jan 12 '23 at 17:44
  • i need to add that i cant store all the channels in a dict. I feel like there's no way rn to do this without storing them? because the method channels_joinChannel should accept more types but in wtg it only accepts a channel type. Lmk if theres any solution – X--X Jan 12 '23 at 19:01
  • you need to know/save the access_hash of these channels because the id is not enough. You may obtain them via the chats field at the base of structures. But for forwarded channel, I'm not sure it's always included. – Wizou Jan 12 '23 at 19:35
  • if you mean fwd_from.save_from_peer() which should contain that as i said i never seen it be no null. But there is a way because on desktop you can click on forwarded from and it takes you to that channel. Are you sure its required because pythons client Telethone has a JoinChannelRequest function that only needs an id to join the channel. Well anyways so its looks like rn i cant achieve this with this library right. – X--X Jan 12 '23 at 20:31