未验证 提交 8a41a64c 编写于 作者: Y Yuan Gao 提交者: GitHub

fix #2073 (#2074)

* fix #2073

* 0.48.12

* 0.48.13
上级 3c338f5d
{ {
"name": "wechaty", "name": "wechaty",
"version": "0.48.11", "version": "0.48.13",
"description": "Wechaty is Conversational SDK Chatbot Makers, Powered by TypeScript, Docker, and 💖", "description": "Wechaty is Conversational SDK Chatbot Makers, Powered by TypeScript, Docker, and 💖",
"main": "dist/src/mod.js", "main": "dist/src/mod.js",
"typings": "dist/src/mod.d.ts", "typings": "dist/src/mod.d.ts",
......
...@@ -872,17 +872,22 @@ class Message extends EventEmitter implements Sayable { ...@@ -872,17 +872,22 @@ class Message extends EventEmitter implements Sayable {
* }) * })
* .start() * .start()
*/ */
public async forward (to: Room | Contact): Promise<void> { public async forward (to: Room | Contact): Promise<void | Message> {
log.verbose('Message', 'forward(%s)', to) log.verbose('Message', 'forward(%s)', to)
// let roomId // let roomId
// let contactId // let contactId
try { try {
await this.wechaty.puppet.messageForward( const msgId = await this.wechaty.puppet.messageForward(
to.id, to.id,
this.id, this.id,
) )
if (msgId) {
const msg = this.wechaty.Message.load(msgId)
await msg.ready()
return msg
}
} catch (e) { } catch (e) {
log.error('Message', 'forward(%s) exception: %s', to, e) log.error('Message', 'forward(%s) exception: %s', to, e)
throw e throw e
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册