wechaty / puppet-padlocal

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

`room-join`事件未触发 #246

Open tianrenli92 opened 1 year ago

tianrenli92 commented 1 year ago

当其他人邀请bot加入一个两人群聊时(通过拉3人群再踢掉1人实现),提示消息是: "$username$"邀请你加入了群聊 "$username$"invited you to the group chat

中文下room-join事件将不会触发: https://github.com/wechaty/puppet-padlocal/blob/fe1c768e4955f5845e04e1bf484aa18c0b5cfbd4/src/padlocal/events/event-room-join.ts#L18

英文下会按OTHER_INVITE_OTHER_REGEX_LIST触发,由于并非他人邀请他人,会在L105产生exception: https://github.com/wechaty/puppet-padlocal/blob/fe1c768e4955f5845e04e1bf484aa18c0b5cfbd4/src/padlocal/events/event-room-join.ts#L25

https://github.com/wechaty/puppet-padlocal/blob/fe1c768e4955f5845e04e1bf484aa18c0b5cfbd4/src/padlocal/events/event-room-join.ts#L105

建议修改OTHER_INVITE_YOU_REGEX_LIST的regex以正确触发事件