Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get fromId not right for room invitation sys message #1297

Closed
huan opened this issue Jun 9, 2018 · 1 comment
Closed

get fromId not right for room invitation sys message #1297

huan opened this issue Jun 9, 2018 · 1 comment
Labels

Comments

@huan
Copy link
Member

huan commented Jun 9, 2018

Wechaty v0.15.122
PuppetPadchat

19:05:54 SILL PuppetPadchatBridge start() padchatRpc.on(message)
19:05:54 VERB PuppetPadchat onPadchatMessage({id=3659882573375130031, type=Sys(5)})
19:05:54 VERB Message static create(3659882573375130031)
19:05:54 SILL Accessory #15815<Message> constructor()
19:05:54 VERB Message constructor(3659882573375130031) for class Message
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 VERB Message ready()
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 SILL Puppet messagePayloadCache(id=3659882573375130031) @ PuppetPadchat<default>
19:05:54 SILL Puppet messagePayloadCache(3659882573375130031) cache MISS
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 VERB Puppet messagePayload(id=3659882573375130031, noCache=false)
19:05:54 SILL Puppet messagePayloadCache(id=3659882573375130031) @ PuppetPadchat<default>
19:05:54 SILL Puppet messagePayloadCache(3659882573375130031) cache MISS
19:05:54 VERB PuppetPadChat messageRawPayloadParser(rawPayload.msg_id=3659882573375130031)
19:05:54 SILL PuppetPadchat messagePayload({"id":"3659882573375130031","timestamp":1528542354812,"fromId":"\"王汝兵\"邀请\"黄伟清\"加入了群聊","type":0,"toId":"wxid_a8d806dzznm822","roomId":"251146372@chatroom"})
19:05:54 SILL Puppet messagePayload() cache SET
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 SILL Puppet messagePayloadCache(id=3659882573375130031) @ PuppetPadchat<default>
19:05:54 SILL Puppet messagePayloadCache(3659882573375130031) cache HIT
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 SILL Puppet messagePayloadCache(id=3659882573375130031) @ PuppetPadchat<default>
19:05:54 SILL Puppet messagePayloadCache(3659882573375130031) cache HIT
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 SILL Puppet messagePayloadCache(id=3659882573375130031) @ PuppetPadchat<default>
19:05:54 SILL Puppet messagePayloadCache(3659882573375130031) cache HIT
19:05:54 SILL Accessory #15815<Message> get puppet()
19:05:54 SILL Accessory <Message> static get puppet()
19:05:54 SILL Puppet messagePayloadCache(id=3659882573375130031) @ PuppetPadchat<default>
19:05:54 SILL Puppet messagePayloadCache(3659882573375130031) cache HIT
19:05:54 SILL Accessory #15815<Message> get wechaty()
19:05:54 SILL Accessory <Message> static get wechaty()
19:05:54 SILL Accessory #15816<Contact> constructor()
19:05:54 SILL Contact constructor("王汝兵"邀请"黄伟清"加入了群聊)
19:05:54 SILL Accessory #15816<Contact> get puppet()
19:05:54 SILL Accessory <Contact> static get puppet()
19:05:54 SILL Accessory #15816<Contact> get puppet()
19:05:54 SILL Accessory <Contact> static get puppet()
19:05:54 SILL Contact ready() @ PuppetPadchat<default>
19:05:54 SILL Accessory #15816<Contact> get puppet()
19:05:54 SILL Accessory <Contact> static get puppet()
19:05:54 SILL Puppet contactPayloadCache(id="王汝兵"邀请"黄伟清"加入了群聊) @ PuppetPadchat<default>
19:05:54 SILL Puppet contactPayload("王汝兵"邀请"黄伟清"加入了群聊) cache MISS
19:05:54 SILL Accessory #15816<Contact> get puppet()
19:05:54 SILL Accessory <Contact> static get puppet()
19:05:54 SILL Puppet contactPayload(id="王汝兵"邀请"黄伟清"加入了群聊, noCache=false) @ PuppetPadchat<default>
19:05:54 SILL Puppet contactPayloadCache(id="王汝兵"邀请"黄伟清"加入了群聊) @ PuppetPadchat<default>
19:05:54 SILL Puppet contactPayload("王汝兵"邀请"黄伟清"加入了群聊) cache MISS
19:05:54 SILL PuppetPadchat contactRawPayload("王汝兵"邀请"黄伟清"加入了群聊)
19:05:54 SILL PuppetPadchatBridge contactRawPayload("王汝兵"邀请"黄伟清"加入了群聊)
19:05:54 SILL PuppetPadchatBridge contactRawPayload("王汝兵"邀请"黄伟清"加入了群聊) retry() attempt=1
19:05:54 SILL PadchatRpc rpcCall(WXGetContact, ["\"王汝兵\"邀请\"黄伟清\"加入了群聊"])
19:05:55 SILL PadchatRpc WXGetContact("王汝兵"邀请"黄伟清"加入了群聊) result: {"big_head":"","city":"","country":"","intro":"","label":"","message":"","nick_name":"","provincia":"","py_initial":"","quan_pin":"","remark":"","remark_py_initial":"","remark_quan_pin":"","sex":0,"signature":"","small_head":"","status":0,"stranger":"","ticket":"","user_name":""}
19:05:55 WARN PadchatRpc WXGetContact cannot get user_name, id: "王汝兵"邀请"黄伟清"加入了群聊
19:05:55 SILL PuppetPadchat contactRawPayloadParser({user_name=""})
19:05:55 SILL Accessory #15816<Contact> get puppet()
19:05:55 SILL Accessory <Contact> static get puppet()
19:05:55 SILL Puppet contactPayloadCache(id="王汝兵"邀请"黄伟清"加入了群聊) @ PuppetPadchat<default>
19:05:55 SILL Puppet contactPayload("王汝兵"邀请"黄伟清"加入了群聊) cache MISS
19:05:55 ERR Contact ready() this.puppet.contactPayload(Contact) exception: cannot get user_name for payload: {"big_head":"","city":"","country":"","intro":"","label":"","message":"","nick_name":"","provincia":"","py_initial":"","quan_pin":"","remark":"","remark_py_initial":"","remark_quan_pin":"","sex":0,"signature":"","small_head":"","status":0,"stranger":"","ticket":"","user_name":""}
19:05:55 ERR Config ###########################
19:05:55 ERR Config unhandledRejection: Error: cannot get user_name for payload: {"big_head":"","city":"","country":"","intro":"","label":"","message":"","nick_name":"","provincia":"","py_initial":"","quan_pin":"","remark":"","remark_py_initial":"","remark_quan_pin":"","sex":0,"signature":"","small_head":"","status":0,"stranger":"","ticket":"","user_name":""} [object Promise]
19:05:55 ERR Config ###########################
19:05:55 ERR Config process.on(unhandledRejection) promise.catch(cannot get user_name for payload: {"big_head":"","city":"","country":"","intro":"","label":"","message":"","nick_name":"","provincia":"","py_initial":"","quan_pin":"","remark":"","remark_py_initial":"","remark_quan_pin":"","sex":0,"signature":"","small_head":"","status":0,"stranger":"","ticket":"","user_name":""})
Config Error: cannot get user_name for payload: {"big_head":"","city":"","country":"","intro":"","label":"","message":"","nick_name":"","provincia":"","py_initial":"","quan_pin":"","remark":"","remark_py_initial":"","remark_quan_pin":"","sex":0,"signature":"","small_head":"","status":0,"stranger":"","ticket":"","user_name":""}
    at Function.contactRawPayloadParser (/home/zixia/chatie/wechaty/src/puppet-padchat/pure-function-helper.ts:105:13)
    at PuppetPadchat.<anonymous> (/home/zixia/chatie/wechaty/src/puppet-padchat/puppet-padchat.ts:341:46)
    at Generator.next (<anonymous>)
    at /home/zixia/chatie/wechaty/src/puppet-padchat/puppet-padchat.ts:25:71
    at new Promise (<anonymous>)
    at __awaiter (/home/zixia/chatie/wechaty/src/puppet-padchat/puppet-padchat.ts:21:12)
    at PuppetPadchat.contactRawPayloadParser (/home/zixia/chatie/wechaty/src/puppet-padchat/puppet-padchat.ts:232:16)
    at PuppetPadchat.<anonymous> (/home/zixia/chatie/wechaty/src/puppet/puppet.ts:484:35)
    at Generator.next (<anonymous>)
    at fulfilled (/home/zixia/chatie/wechaty/src/puppet/puppet.ts:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
@huan huan added the bug label Jun 9, 2018
@huan
Copy link
Member Author

huan commented Jun 11, 2018

Fixed. It's because the content format of SYS type message is not the same as the other message.

@huan huan closed this as completed Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant