Closed ng8weji9vowdv closed 5 months ago
You receive the message when call sendMessage
.
You receive updateNewMessage with yet unsent messages after app restart.
Since you can't answer that question in the proper way lemme ask you this, how do i reset unset messages all at once?
In exactly the same way as in any Telegram app. You open each chat with yet unsent message and delete yet unsent messages one by one.
You receive all yet unsent messages from TDLib in updates.
Why not to expose a single method that would go through database and delete all unsent by tdlib messages?
Because this is never needed by Telegram apps.
When? On startup?
And on start up also. Apps aren't supposed to have their own database.
updateNewMessage
.
You must never called cancelPreliminaryUploadFile
for files for which preliminaryUploadFile
wasn't called.
All being sent messages are received in updateNewMessage
updates by the app. Apps can keep track of all yet unsent messages in any point in time if they wish to.
Why not to make an exception for files which are clearly using preliminaryUploadFile in sendMessage/sendMessageAlbum
The only files using preliminaryUploadFile
are the files for which preliminaryUploadFile
is called.
to let us cancel their upload and cause the fail
Apps don't fail message sending when restarting.
I already said multiple times how to abort sending all yet unsent messages.
You need to delete the yet unsent message with the file to cancel its uploading.