wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

Error: payload.fromId is null? #72

Closed suntong closed 3 years ago

suntong commented 3 years ago

I've got the following error:

(node:80250) UnhandledPromiseRejectionWarning: Error: payload.fromId is null?
    at WechatifiedMessage.talker (/path/to/nodejs/node_modules/wechaty/dist/src/user/message.js:182:19)
    at Wechaty.onMessage (/path/to/.../on-message.js:62:12)
    at Wechaty.emit (events.js:315:20)
    at Wechaty.EventEmitter.emit (domain.js:467:12)
    at PuppetPadlocal.<anonymous> (/path/to/nodejs/node_modules/wechaty/dist/src/wechaty.js:309:30)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

on my code (on-message.js:62:12) of:

  if (!msg.talker()) {
    // console.log(msg)
    return
  }

which is used to weed out those messages that don't have "from" field.

It used to be working with other puppets, but not with padlocal.

For the puppet-compatibility purpose, would it be OK for padlocal to support that as well?

NB, such messages normally come from

某某完成了群公告

thx

suntong commented 3 years ago

dup of #64, but seems that's going towards adding new message types. So I'm keeping this open.

padlocal commented 3 years ago

Close this issue, We will discuss in #64 .