Skip to content

Instantly share code, notes, and snippets.

@MawKKe
Last active May 7, 2024 19:21
Show Gist options
  • Save MawKKe/56537c2dbbbad63c48af718296acb942 to your computer and use it in GitHub Desktop.
Save MawKKe/56537c2dbbbad63c48af718296acb942 to your computer and use it in GitHub Desktop.
Fix Telegram stuck draft message

Problem with Telegram and stuck Draft message

2024-05-06: I was using telegram to send a message in one of the group chats I'm in.

2024-05-07: I noticed that a copy of my sent message was left as draft in the same chat (which is indicated by a red Draft: prefix in the chat list). If I opened the chat group, the draft message would indeed be entered in the message preparation box.

However, I could not erase the draft message; if I tried, it would simply return in a few seconds. I tried several times.

I noticed I could erase parts of the draft or add more. All those changes would be reflected between my phone and laptop. But I could not delete the last character. If I tried, the last character would return as the draft message.

Additionally, sometimes the Draft: indicator would bounce between existing and not existing. Sometimes the Draft: indicator would be shown on one client/device, but in an active chat window on another client/device the draft message would not be present in the message preparation box.

I tried deleting caches and Cloud Drafts from the settings... no change.

I tried force closing the Telegram client (app) on my phone, and then doing the erasure on my laptop client (native app), hoping that this would be some weird edge case or race condition bug in the state synchronization between clients. No help. I tried both ways. No help. I tried closing both apps for a while. No help. The draft message would return.

Solution

Looking through the Telegram settings I noticed I actually have three active clients: My phone (app), laptop (native app) and a browser session on my desktop PC. Not just two as I thought.

Oops 🤦‍♂️

I closed the desktop's browser. Then deleted the draft on one of the remaining two. The draft message would not reappear again.

Great success!

So I my original guess was right, but I was operating under incomplete information.

..not so fast

Turns out it wasn't that simple. I tried opening the desktop client again (assuming I get the latest version), the problem reappeared. After I updated the other clients to latest versions, the problem seems to finally gone away. So moral of the story is... keep your software up to date 😉


Hypothesis: perhaps there is/was some version incompatibility between the clients causing these issues. I had not reloaded the desktop browser tab in a while, since I do not use it often (my PC is running 24/7...). By closing the incompatible, interfering client, the draft message could finally be deleted between the other two (phone and laptop). Who knows, at least the problem is now gone...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment