Fixed error when loading an image of a expired forwarded message(image) originated from a bot (Empty Message) #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using tvdstaaij/telegram-history-dump to archive my chats, and when it hits a forwarded message of a bot message that has expired vysheng/tg will crash with the error below when calling tgl_do_load_photo on an ID of an Empty Message. The empty message still has the contents of the forwarded message when you request the history which is the issue causing this. This fix works seamlessly across the various clients.
Should this fix also be applied other tgl_do_load_(media type here)?
Crash on vysheng/tg when doing load_photo on an Empty Message:
Example of an Empty Message:
Example of an Empty Message in history:
exactly the same as a forwarded message(image)