Skip to content

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

Merged
merged 6 commits into from
Dec 30, 2019
Merged

Recall msg #1886

merged 6 commits into from
Dec 30, 2019

Conversation

SilentQianyi
Copy link
Contributor

I'm submitting a...

[ ] Bug Fix
[ ] Feature
[ ] Other (Refactoring, Added tests, Documentation, ...)

Checklist

  • Commit Messages follow the Conventional Commits pattern
    • A feature commit message is prefixed "feat:"
    • A bugfix commit message is prefixed "fix:"
  • Tests for the changes have been added

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?

[ ] Yes
[ ] No

Issue
#1885

* bot
* .on('message', async m => {
* const recallMessage = await msg.say('123')
* const isSuccess = await recallMessage.recall()

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.

Copy link
Member

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.

Copy link
Member

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.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

Copy link
Member

@huan huan left a 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.

* bot
* .on('message', async m => {
* const recallMessage = await msg.say('123')
* const isSuccess = await recallMessage.recall()
Copy link
Member

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.

@SilentQianyi SilentQianyi requested a review from huan December 30, 2019 13:45
Copy link
Member

@huan huan left a 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!

@huan huan merged commit 3e08d3c into wechaty:master Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants