celestix/gotgproto

duplicate update received completely randomly

Opened this issue · 2 comments

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

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?

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?