Repository navigation
Fix #488 app.message listeners do not catch messages with subtype: thread_broadcast - #489
Conversation
…read_broadcast
Codecov Report
@@ Coverage Diff @@
## main #489 +/- ##
=======================================
Coverage 91.43% 91.43%
=======================================
Files 167 167
Lines 5533 5533
=======================================
Hits 5059 5059
Misses 474 474
Continue to review full report at Codecov.
|
| # As of Jan 2021, most bot messages no longer have the subtype bot_message. | ||
| # By contrast, messages posted using classic app's bot token still have the subtype. | ||
| constraints = {"type": "message", "subtype": (None, "bot_message")} | ||
| constraints = { |
There was a problem hiding this comment.
Would you be opposed to adding a comment here (and in async_app.py) that says something like:
# None processes messages without a subtype. thread_broadcast is for a
# message sent in a thread with "Also send to #channel" checked.
to add a bit of clarity as to why these subtypes need to be explicitly "constrained"?
There was a problem hiding this comment.
@eddyg Thanks for the great feedback (as always!) - I just added more comments for these constraints.
There was a problem hiding this comment.
The new comments are excellent. 🎉 I remember wondering about this exact section of code when I was learning Bolt. So thank you!
This pull request fixes #488. Refer to the issue for details.
Category (place an
xin each of the[ ])slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsslack_bolt.adapter/docsRequirements (place an
xin each[ ])Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.shafter making the changes.