Swiftgram / TDLibKit

Native Swift wrapper for Telegram's TDLib. Available on iOS, macOS, watchOS, tvOS and visionOS.
MIT License
106 stars 23 forks source link

Chats disappear after sending message #41

Closed k0ry closed 10 months ago

k0ry commented 11 months ago

Hi! I'm getting trouble with chats. I open session, login etc. After loading chats I open chat with openChat, send message and after restarting app that chat disappear. (It don't fire updateNewChat, all other chats are ok ). After some time chat can appear and works fine until I send message.

In same time data about chat received as I see in logs:

Receive: --------------- {"@type":"updateNewChat","chat":{"@type":"chat","id":-933277225,"type":{"@type":"chatTypeBasicGroup","basic_group_id":933277225},"title":"KidGram bags of bugs","photo":{"@type":"chatPhotoInfo","small":{"@type":"file","id":2350,"size":13216,"expected_size":13216,"local":{"@type":"localFile","path":"/private/var/mobile/Containers/Data/Application/BE29DD56-E468-4B58-9903-E7D04C0097A9/Library/Caches/tdlib/profile_photos/file_34.jpg","can_be_downloaded":true,"can_be_deleted":true,"is_downloadin ....

what's can cause this? Any ideas?

Kylmakalle commented 11 months ago

Hi! I doubt it's something on TDLibKit's side. AFAIK it's correct to not store anything on your app's side, and tdlib will retrieve the chat from the cache. Here's something not so similar but probably related: https://github.com/tdlib/td/issues/2430

I bet you'd find a good answer within tdlib repo.