-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Recall msg #1886
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
Recall msg #1886
Conversation
Change Mini Program payload in wechaty (#1883)
src/user/message.ts
Outdated
* bot | ||
* .on('message', async m => { | ||
* const recallMessage = await msg.say('123') | ||
* const isSuccess = await recallMessage.recall() |
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.
recall should need a messageId.
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 don't think so, this is a function on Message
class, it is recalling the message which called this function.
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 don't think so, this is a function on Message
class, it is recalling the message which called this function.
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.
ok then, I send two messages. what should I do for I want to recall the first one?
const recallMessage = await msg.say('123')
const recallMessage2 = await msg.say('456')
const isSuccess = await recallMessage.recall()
like this?
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.
yes.
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.
Thank you very much for this new feature for the Message class!
I had merged the PR from the wechaty-puppet side so that you will be able to make this PR pass the CI.
Please also follow my comment to fix the example code.
I'll merge this PR after the CI gets green.
src/user/message.ts
Outdated
* bot | ||
* .on('message', async m => { | ||
* const recallMessage = await msg.say('123') | ||
* const isSuccess = await recallMessage.recall() |
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.
recallMessage
might be null, please fix the example code for this.
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 for the quick response!
I'm submitting a...
Checklist
Description
please describe the changes that you are making
for features, please describe how to use the new feature
please include a reference to an existing issue, if applicable
Does this PR introduce a breaking change?
Issue
#1885