#2555 closed defect (bug) (fixed)
Slack: Update Trac bot to support threads
Reported by: | SergeyBiryukov | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | low | |
Component: | Communication (Matrix, Slack, IRC) | Keywords: | needs-patch |
Cc: |
Description
If someone shares some tickets in a Slack thread, the Trac bot posts ticket links to the main channel, out of context.
The bot should be updated to post these links to the corresponding thread:
https://api.slack.com/docs/message-threading#best_practices
Attachments (1)
Change History (17)
This ticket was mentioned in Slack in #core by sergey. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-customize by pento. View the logs.
7 years ago
This ticket was mentioned in Slack in #forums by sergey. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by sergey. View the logs.
7 years ago
#7
@
7 years ago
- Priority changed from normal to low
The current bot is triggered by an outgoing webhook which doesn't provide any infos about threads. To support threads we have to write a new app using the new APIs by Slack.
This ticket was mentioned in Slack in #core-customize by jeffpaul. View the logs.
7 years ago
#9
follow-up:
↓ 10
@
7 years ago
For those interested in trying to get resolution on this, where is the code for Tracbot to crack open and try to patch/issue a PR?
#10
in reply to:
↑ 9
@
7 years ago
Replying to jbpaul17:
where is the code for Tracbot to crack open and try to patch/issue a PR?
The current code is here: https://meta.trac.wordpress.org/browser/sites/trunk/common/includes/slack/trac
#11
@
7 years ago
According to the docs (or, the sample data in the docs, at least), the outgoing webhook provides the thread_ts
parameter.
I've just been doing some testing, and it looks like the incoming webhook API doesn't obey the thread_ts
parameter. I've pinged Slack support for confirmation.
#12
@
7 years ago
Update from Slack: they're not going to work on it in the near future.
Soooo.... the Slack API code will need to be rewritten. :-)
#13
@
6 years ago
I took a look how this might work. From what I have read and tested in another Slack workspace I have access, the new Slack incoming webhooks require a webhook URL to be setup per channel the app should be allowed to post. Per the new docs:
You cannot override the default channel (chosen by the user who installed your app), username, or icon when you're using Incoming Webhooks to post messages. Instead, these values will always inherit from the associated Slack app configuration.
Due to this limitation, for the various use cases I can see in Slack, there would need to be a different Slack app for each different named bot that would post:
- WordPress commit
- WordPress Trac
- WordPress.org Meta Trac
- etc.
#14
@
5 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 9228:
#15
@
5 years ago
I don't know when it happened, but I spotted that the incoming-webhook
supports threading!
I've implemented this in [9228], with a caveat - The outgoing-webhook
doesn't let us know if the message we're triggered by is a channel broadcast or not, so for now, we'll always only reply in-thread and not also broadcast to the channel in response to a broadcast message.
#2892 was marked as a duplicate.