-
Notifications
You must be signed in to change notification settings - Fork 399
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
Link Expanding generates extra unexpected message to be received by Bolt app #463
Comments
EDIT: note below is not specific to Bolt, but relates to Slack Original message: I think this can definitely be considered as a bug, as the received
Standard
|
In fact, I guess the best way to handle any text message would be rather to use a pattern so that only "message event" with a
In the end, some additional notes in the Bolt documentation about "message events" could be enough, and the fact that adding a pattern as above filters out any "message event" that does not have a |
Thank you very much for writing in. I will share this feedback with the server-side teams concerned. Regarding the discussion on the Bolt side, I will create a A possible workaround at this point is to test if there is a subtype in a For reference: a similar issue related to TypeScript type definitions - #311 |
Thanks for your reply and the follow-up issue! I've implemented both workarounds for now (ignoring all In the short term, I think this way of handling any new message ( |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. |
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number. |
First of all, thanks for the great work with Bolt!
Details of the issue below.
Description
I have an app that listens to all messages it subscribed to (
app.message(messageListener)
). If it sends a message that includes a link (e.g. using thesay
function), it receives an extra message due to the Slackbot-LinkExpanding that updated the original message.From my point of view, this is an unexpected behavior: this event with type
message
and subtypemessage_changed
should be filtered out (as the echoed messages seem to be already), or be handled withapp.event
instead ofapp.message
(but what would I do with the information that my own message has been updated by Slack itself due to Link Expanding?)Of course, I can filter these events myself, but I feel this should be built-in into Bolt, as a very simple example (see below) does not behave as expected (from user and developer point of view).
The same thing happens if the user sends a message that includes a link.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version: 1.8.0
node version: 12.15.0
OS version(s): Ubuntu 18.04.4
Steps to reproduce:
message.im
Expected result:
As a user talking to that bot, I expect to receive a single answer for each message.
As a developer of an almost "hello world" example, I expect it to work in the most simple and obvious way.
Actual result:
The user receives the message twice. The second one is triggered by the update event when the link is expanded by Slackbot-LinkExpanding.
Attachments:
The text was updated successfully, but these errors were encountered: