tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Delete a message: What should happen on reply messages? #2964

Closed Flohack74 closed 3 months ago

Flohack74 commented 3 months ago

So when a message is delete we get updateDeleteMessages and remove them from our view model, if they have been loaded there. But lets say, there is a message that is a reply to a now deleted message.

There is no update available to modify the reply_to data of a message. So in this case we would still show the citation header on this message with the summary. But the official client immediately says "deleted message" instead.

How do you propagate this change? Is there a lookup table for message citations that is used to update the replies? Just being curious since currently we crash the app if you click on the citation to jump to the deleted message :)

levlam commented 3 months ago

The other clients traverse all messages from the chat that are present in memory and update relevant reply_to data whenever a message is deleted or edited.

Flohack74 commented 3 months ago

Ah ok so thats actually easy: set it to 0, will default to display a deleted message, thanks!