Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send updates for deleted messages #286

Open
rayanbzd opened this issue Jun 13, 2022 · 15 comments
Open

Send updates for deleted messages #286

rayanbzd opened this issue Jun 13, 2022 · 15 comments
Labels
enhancement New feature or request

Comments

@rayanbzd
Copy link

Would it be possible to send updates when a message is deleted ? Just like when messages are edited.

@levlam
Copy link
Contributor

levlam commented Jun 13, 2022

This is not possible to implement right now, but may become possible in the future.

@levlam levlam added the enhancement New feature or request label Jul 11, 2022
@isage
Copy link

isage commented Oct 27, 2022

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.

@levlam
Copy link
Contributor

levlam commented Oct 27, 2022

@isage Could you send a link to the website, which shows the "doubles"?

@isage
Copy link

isage commented Oct 27, 2022

I made a test-page https://muztube.ru/test.html

@isage
Copy link

isage commented Oct 27, 2022

oh. it looks like for post with pictures there's new message event for EACH pictuure in post with different id's

@levlam
Copy link
Contributor

levlam commented Oct 27, 2022

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.

@isage
Copy link

isage commented Oct 27, 2022

(it out of scope of that issue, but how would i differentiate between them to show only one post with both pictures instead?)

@levlam
Copy link
Contributor

levlam commented Oct 27, 2022

Message object in Bot API has media_group_id field.

@rebelcode-xr
Copy link

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.

@AYMENJD
Copy link

AYMENJD commented Feb 19, 2023

@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
Copy link

@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.

@AYMENJD
Copy link

AYMENJD commented Feb 19, 2023

@rebelcode-xr it's exists but not for bots. Allowing bots to receive it will produce the above behavior.

@rebelcode-xr
Copy link

@tigco
Copy link

tigco commented Jun 2, 2023

I need this too

@sohamdeogaonkar
Copy link

sohamdeogaonkar commented Jan 17, 2024

+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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants