-
Notifications
You must be signed in to change notification settings - Fork 635
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
ReactionMessage item_user property should be marked as optional (Incoming Webhooks) #468
Comments
thanks for the report! this might be fixed in #465, because the code path changes significantly. @y-i by any chance, is the user reacting to the incoming webhook message not a member of the local workspace? specifically, is this occurring in a shared channel? @shanedewael do we have any tests that will cover this scenario? i don't think its specific to Incoming Webhook, but we should try. |
@aoberoi I didn't use a shared channel. So the user is a member of the local workspace. |
@y-i thanks, i was able to reproduce this (both on RTM and on Events API) it turns out that this is expected (but not well documented) behavior. when the message is generated from an Incoming Webhook, there actually is no "user" responsible for sending it, so there's no we'll be updating the following documentation page to more clearly describe this: https://api.slack.com/events/reaction_added in the meantime, i think we can more clearly mark the property as optional here: hubot-slack/src/message.coffee Line 12 in 04079d0
|
Description
hubot-slack can't react to
reaction_added
events if the message which reaction was added to is incoming webhook.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:
hubot-slack version: 4.4.0
node version: v8.9.4
OS version(s): macOS Sierra (10.12.6)
Steps to reproduce:
robot.react()
to a channel.Expected result:
robot.react()
will be triggered.Actual result:
robot.react()
will not be triggered.Attachments:
At this point,
item_user
is undefined in message if the message was posted by incoming webhook.I can react to messages which were posted by incoming hook by changing
return unless user && item_user
toreturn unless user
.The text was updated successfully, but these errors were encountered: