-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Supported reply_to_message_id for Telegram topics. #3560
base: main
Are you sure you want to change the base?
Supported reply_to_message_id for Telegram topics. #3560
Conversation
41a7817
to
b95fc69
Compare
Dear maintainers, I supported this for my project, but I think that it will be useful for Telegram users. |
+1 |
Signed-off-by: Vadim <[email protected]>
Signed-off-by: Vadim <[email protected]>
Signed-off-by: Vadim <[email protected]>
18ee4ae
to
fbca708
Compare
Make some changes as the result of review. |
Hi @gotjosh, just checking in on the status of this PR. Looking forward to any updates, as it seems quite useful. Thanks! |
@simonpasquier, @w0rm, @gotjosh |
hello friends it will be so good if you review this PR, i need send alerts to my telegram thread |
Hi all, this very good function, @simonpasquier, @w0rm. @gotjosh please review it. |
@nicknamenotknown I'm not a reviewer or maintainer in this repository |
Sorry, it's my mistake. |
@grobinson-grafana, why are your PRs getting reviewed and merged almost instantly, while this one has been languishing here for three months? |
@simonpasquier hello! I see your PRs was merged last time. |
+1 |
+1 |
This change is trivial and will not affect anything. Why not accept it? Grafana already have this feature grafana/alerting#143 |
This MR adds very useful feature, please accept it. :) |
@VadimRezvov as a non Telegram user, what is the difference between We also have this PR here that uses the same configuration option |
@grobinson-grafana, as user @raphielscape said in the PR you linked, when answering the same question:
So, though it serves the same purpose of sending a message to a telegram supergroup thread, it could also reply to a message on any chat, channel or group. |
OK. It sounds like there might be a use case for both? I think #3638 can be reviewed once the author has signed their commits (#3638 (comment)). R.E this PR, the choice of |
To be short the message_thread_id replies to the first message of Telegram group ONLY in supergroups, and the reply_to_message_id (now it is reply_to_message https://core.telegram.org/bots/api#message) replies to the certain message id in the chat for any group type, so that its more multipurpose. |
OK! I think we need to coordinate the two PRs (this and #3638). Have you also tested this change to make sure it works? The reason I ask is the version of the telebot package used in Alertmanager uses if opt.ReplyTo != nil && opt.ReplyTo.ID != 0 {
params["reply_to_message_id"] = strconv.Itoa(opt.ReplyTo.ID)
} You might also need to update the telebot package in |
Ok, I will take this task, and will be back with results in nearest time. |
Topics is only available for Supergroups, that's what the documentation conveys, you can't enable Topics in chat that are not supergroup to begin with, so message_thread_id is the proper way to send a message to a Topic as the intended MR is for replying to a Topic rather than message, and that message thread starter ID might be changed if the chat has gone beyond 1 million, so this might not be sustainable to use reply to message as the message it replied might be lost if you have a lot of messages on the chat |
Hi! 👋 #3638 has been merged to main. I would appreciate it if you could test it and make sure it works as I cannot seem to create a Telegram supergroup or topics (perhaps I just don't know how to do it?). |
Hi, grobinson-grafana! I'm new to GitHub, can you tell me if I can download the latest version of AlertManager and test this functionality? |
Looks like you haven't enabled mantainers to be able to update PRs - I was trying to make a small change and merge this PR, but it seems like I can't. I'll leave you with the diff and if you get it done by tomorrow, we'll be able to include it in the next release:
|
This PR brings support to sending messages to specific Telegram topic,
see https://telegram.org/blog/topics-in-groups-collectible-usernames
Topic is identified by id of the first message in this topic.
In order to find out the id of the first message in a topic, in the Telegram desktop client,
right-click on the first message in the topic, select "Copy Message Link".
Get a link like:
https://t.me/c/1234567890/1234/1235
The second part of the link is the id of the first message in the topic:
1234