-
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
Fix #1237 Updates to message subtypes doc #1240
Conversation
docs/_basic/ja_listening_events.md
Outdated
app.message(subtype('message_changed'), ({ event }) => { | ||
console.log(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`); |
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.
I know the usage of console is not your change but we may want to improve the part as well. Can you change the code this way? It's the same for the English one.
app.message(subtype('message_changed'), ({ event }) => { | |
console.log(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`); | |
app.message(subtype('message_changed'), ({ event, logger }) => { | |
logger.info(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`); |
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.
Yeah, that makes sense. Maybe we should change it for the entirety of the docs? It looks like console.log
is used throughout at the moment.
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.
Oh I see. In the case, let's work on the replacement in a different issue/PR!
Codecov Report
@@ Coverage Diff @@
## main #1240 +/- ##
=======================================
Coverage 73.22% 73.22%
=======================================
Files 17 17
Lines 1438 1438
Branches 431 431
=======================================
Hits 1053 1053
Misses 300 300
Partials 85 85 Continue to review full report at Codecov.
|
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.
Looks good to me. @srajiang if this looks good to you too, can you "squash and merge" this PR tomorrow in your local time?
Conflicts have been resolved ✅ |
Summary
Fixes #1237 for both EN and JP docs. Changes message subtype from
bot_message
tomessage_changed
and makes it explicit to importsubtype
from the Bolt package.Requirements (place an
x
in each[ ]
)