Skip to content
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

主动撤回消息 #1885

Closed
SilentQianyi opened this issue Dec 6, 2019 · 4 comments
Closed

主动撤回消息 #1885

SilentQianyi opened this issue Dec 6, 2019 · 4 comments

Comments

@SilentQianyi
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
实现主动撤回消息功能。

Describe the solution you'd like
A clear and concise description of what you want to happen.
在message中增加撤销消息api

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[enhancement]

@SilentQianyi
Copy link
Contributor Author

wechaty:
在message中实现recall方法,返回值是boolean类型。

public async recall (): Promise<boolean>

wechaty-puppet:
receiver: 需要撤回消息的接收方,messageId: 需要撤回的消息id

public async messageRecall (receiver: Receiver, messageId: string): Promise<boolean>

wechaty-puppet-padplus:
selfId: 自己的id,receiverId: 需要撤回消息的接收方,messageId: 需要撤回消息的消息id

public async recallMessage (selfId: string, receiverId: string, messageId: string): Promise<boolean>

在该方法中需要调用底层方法,需要参数:

{
  fromUserName: string, 
  msgId: string,
  toUserName: string
}

返回值:

成功:
{
  "BaseResponse": {
    "Ret": 0,
    "ErrMsg": "已撤回"
  }
}

超时:
{
  "BaseResponse": {
    "Ret": -430,
    "ErrMsg": "该消息超过撤回时间,不能被撤回。"
  }
}

@huan
Copy link
Member

huan commented Jan 1, 2020

This feature had been merged and will be available with Wechaty on v0.29.30 or above.

Cloud you please let us know which version of what puppet will support this new feature?

Thank you very much.

@SilentQianyi
Copy link
Contributor Author

SilentQianyi commented Jan 2, 2020

wechaty: on v0.29.25 or above
wechaty-puppet: on v0.17.4 or above
wechaty-puppet-padplus: on v0.3.2 or above

@huan
Copy link
Member

huan commented Jan 2, 2020

Thank you very much for the update!

Please feel free to close this issue if it has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants