telegram-bot-api
telegram-bot-api copied to clipboard
Send updates for deleted messages
Would it be possible to send updates when a message is deleted ? Just like when messages are edited.
This is not possible to implement right now, but may become possible in the future.
Are there any updates on this?
Use case: we need to display 5 last posts from our tg channel on website. Rn it's implemented as webhook receiving new messages and storing their id's, then we use widget api with those ids. Problem is, sometimes editors remove posts from tg channel and re-post them, but we have no way of knowing that. So we display "doubles" on website (that's another question, though, why is there two messages with different id, and despite one being deleted widget api still happily shows it). Even without doubles, displaying "this post doesn't exist" is a no-go for us.
@isage Could you send a link to the website, which shows the "doubles"?
I made a test-page https://muztube.ru/test.html
oh. it looks like for post with pictures there's new message event for EACH pictuure in post with different id's
The first link is for the second photo in a media album and the second link is for the first photo in the same media album. Widget by default shows all photos in the album. You can use link in the form https://t.me/<username>/<message_id>?single to show specific media or show only one post for each media album.
(it out of scope of that issue, but how would i differentiate between them to show only one post with both pictures instead?)
Message object in Bot API has media_group_id field.
very important feature to have: we want to be able to fully manage a channel from our website, but if an editor deletes a post, we have no way to keep the web db in sync. Please implement this asap 🙏
Are there any updates on this?
Use case: we need to display 5 last posts from our tg channel on website. Rn it's implemented as webhook receiving new messages and storing their id's, then we use widget api with those ids. Problem is, sometimes editors remove posts from tg channel and re-post them, but we have no way of knowing that. So we display "doubles" on website (that's another question, though, why is there two messages with different id, and despite one being deleted widget api still happily shows it). Even without doubles, displaying "this post doesn't exist" is a no-go for us.
@rebelcode-xr You can't by this feature. its not guaranteed to receive update about deleted messages in real-time for channels and groups and maybe private chats too.
@rebelcode-xr You can't by this feature. its not guaranteed to receive update about deleted messages in real-time for channels and groups and maybe private chats too.
What do you mean? This feature doesn't exists yet.
@rebelcode-xr it's exists but not for bots. Allowing bots to receive it will produce the above behavior.
https://bugs.telegram.org/c/735
I need this too
+1 I want this features
I just want to know what's the problem for not adding it. https://bugs.telegram.org/c/735 This feature has been requested more than 3 years ago It has 165+ upvotes on bug platform Almost issue about this case on almost every library for Telegram bots
We can get the update of edited messages What's makes the problem with delete messages I thinks it ultimately based on mtproto It has feature about that So what's the problem adding on bot api