-
Notifications
You must be signed in to change notification settings - Fork 393
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
Fix #1512 Remove say from SlackShortcutMiddlewareArgs for GlobalSho… #1849
Conversation
Thanks for the contribution! Before we can merge this, we need @mlauter to sign the Salesforce Inc. Contributor License Agreement. |
Codecov Report
@@ Coverage Diff @@
## main #1849 +/- ##
=======================================
Coverage 82.15% 82.15%
=======================================
Files 18 18
Lines 1519 1519
Branches 435 435
=======================================
Hits 1248 1248
Misses 175 175
Partials 96 96 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM 👍
Thanks a lot for your contribution! If there is no objection from other maintainers, we can merge this PR tomorrow in Pacific timezone. |
@seratch let me know if there's anything else you need from me |
@mlauter Thanks for the reminder. I was on PTO yesterday. Now we can merge this PR 👍 |
Summary
This pull request resolves #1512 by removing
say
from theSlackShortcutMiddlewareArgs
type for GlobalShortcuts. Global shortcuts are not associated with a conversation, so global shortcut listeners are not passed asay
function.Details
Global shortcuts are not associated with a conversation (the payloads do not have a channel id), so no say function is set in listenerArgs for them.
Message shortcuts are associated with a conversation, so listeners do receive the
say
function.This change uses a conditional type to set the type of
say
toSayFn
for a message shortcut'sSlackShortcutMiddlewareArgs
butundefined
otherwise.Testing
Requirements (place an
x
in each[ ]
)