We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8404f40 commit 72ee418Copy full SHA for 72ee418
src/wechat.js
@@ -52,7 +52,7 @@ class Wechat extends WechatCore {
52
}
53
54
sendMsg (msg, toUserName) {
55
- if (typeof msg === 'string') {
+ if (typeof msg !== 'object') {
56
return this.sendText(msg, toUserName)
57
} else if (msg.emoticonMd5) {
58
return this.sendEmoticon(msg.emoticonMd5, toUserName)
@@ -279,6 +279,7 @@ class Wechat extends WechatCore {
279
})
280
})).catch(err => {
281
debug(err)
282
+ this.emit('error', err)
283
284
285
if (msg.ToUserName === 'filehelper' && msg.Content === '退出wechat4u' ||
0 commit comments