celestix / gotgproto

A wrapper for Go Telegram Client, i.e. gotd/td.
GNU General Public License v3.0
220 stars 42 forks source link

duplicate update received completely randomly #101

Open asdfzxcvbn opened 5 days ago

asdfzxcvbn commented 5 days ago

i have this handler:

client.Dispatcher.AddHandler(handlers.NewMessage(filters.Message.Media, receivedFile))

sometimes, receivedFile will be called with the exact same message completely randomly, even though no error occurred. this can happen several times within a few minutes, and i believe it's even happened with a channel post that's 2 months old. i can confirm that it is the exact same message (same message and chat id) when receivedFile is called twice.

98 was also opened regarding this issue but was closed by the author in error

celestix commented 5 days ago

Hi @asdfzxcvbn, IIRC telegram has changed their backend functionality of media management recently causing update for a media to be sent twice by telegram once before processing and once after processing, could you check if that's the issue in this case?

asdfzxcvbn commented 4 days ago

Hi @asdfzxcvbn, IIRC telegram has changed their backend functionality of media management recently causing update for a media to be sent twice by telegram once before processing and once after processing, could you check if that's the issue in this case?

i'm not downloading media like photos/videos, but files, those arent "processed" right?