wechaty / wechaty-puppet-padchat

Padchat Puppet for Wechaty
https://www.npmjs.com/package/wechaty-puppet-padchat
Apache License 2.0
281 stars 46 forks source link

The ShareCard message get error when use function "toContact()" #202

Open aceHubert opened 5 years ago

aceHubert commented 5 years ago

0. Report Issue Guide

Please search in the issue first, and make sure your problem had not been reported before.

1. Provide Your Package Version

2. Expected behavior

Question: What behavior do you expect?

Answer: "toContact()" works well

3. Actual behavior

Question: What actual behavior did you experience?

Answer: get error "message not a ShareCard"

4. Steps to reproduce your problem (and fixes, if any)

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Question: What're the reproducible steps for us to see your problem?

Answer: send/receive ShareCard message to/from friend

5. Full Output Logs

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: Message#Contact(🗣Contact<微笑代表淡定>👤Contact) 14:58:31 WARN Message toContact() to be implemented Error: message not a ShareCard at AnotherOriginalClass. (D:\WorkSpace\.hubert\wechatspy\node_modules\wechaty\dist\src\user\message.js:723:23) at Generator.next () at D:\WorkSpace\.hubert\wechatspy\node_modules\wechaty\dist\src\user\message.js:7:71 at new Promise () at __awaiter (D:\WorkSpace\.hubert\wechatspy\node_modules\wechaty\dist\src\user\message.js:3:12) at AnotherOriginalClass.toContact (D:\WorkSpace\.hubert\wechatspy\node_modules\wechaty\dist\src\user\message.js:720:16) at Wechaty.bot.on.on.on (D:\WorkSpace\.hubert\wechatspy\main\docker.js:48:39) ```
windmemory commented 5 years ago

I think it because that the toContact() is not implemented, you can see this in the log:

14:58:31 WARN Message toContact() to be implemented