contact alias not sync after call contact.alias(string) to set alias
Created by: kis87988
Provide Your Network Information
- Where is the location of your server? (i.e. City, or In/Out China) U.S.
- Which cloud platform(AliYun/Qcloud/DigitalOcean/etc) are you using? own machine
npm run doctor
or wechaty run doctor
(for docker user), paste output here
Run //docker run in container
const old_alias = await contact.alias() const new_alias= "new_alias" console.log(old_alias) // old_alias await contact.alias(new_alias) await contact.sync() await delay(getRandomIntInclusive(3000, 5000)) // delay 3~5 secs const new_set_alias = await contact.alias() console.log(contact.name() + ' Alias:' + new_set_alias ) //contact name Alias: old_alias
Expected behavior
The contact alias should be set to new_alias in the wechaty after call alias()
Actual behavior
The contact alias not be set to new_alias in the Wechaty after call alias() It still keep the old alias(). NOTE: this also happen when new friend being added, and it only be correct alias after Wechaty docker restart
Steps to reproduce the behavior (and fixes, if any)
None for now. It may be sync issue with cache.
Full Output Logs
$ docker create -t -i --name=$docker_name \
--mount type=bind,source="${dir}",target=/bot \
-e WECHATY_LOG=silly \
-e TZ="America/Los_Angeles" \
zixia/wechaty:latest mybot.ts
$ docker start -a $docker_name
Show Logs
WECHATY_LOG=silly
set
Paste the full output logs here with # PASTE FULL LOG OUTPUT AT HERE:
10:26:26 VERB Puppet selfId()
10:26:26 VERB Contact friend()
10:26:26 SILL Contact alias()
old_alias
10:26:26 SILL Contact alias(new_alias))
10:26:26 VERB PuppetPadchat contactAlias(wxid_, new_alias)
10:26:26 SILL PadchatRpc rpcCall(WXSetUserRemark, ["wxid_","new_alias"])
10:26:26 SILL PadchatRpc WXSetUserRemark result: {"message":"","status":0}
10:26:26 SILL Contact ready() @ Puppet#0<PuppetPadchat>(Ponyo)/PuppetPadchat#0
10:26:26 SILL Contact ready() isReady() true
10:26:29 SILL PadchatRpc onSocketTencent() discard empty message msg_id payoad: {"continue":0,"msg_type":32768,"status":1,"uin":488036821}
10:26:29 SILL PadchatRpc initHeartbeat() throttleQueue.subscribe(ws.on(message))
10:26:29 SILL PuppetPadchat startWatchdog() padchatManager.on(heartbeat)
10:26:29 SILL Wechaty memoryCheck() free: 151 MB, require: 4 MB
10:26:31 SILL Contact alias()
contact name Alias: old_alias
10:26:33 SILL Wechaty start() setInterval() this timer is to keep Wechaty running...
10:26:49 SILL PadchatRpc initHeartbeat() debounceQueue.subscribe(ws.on(message))
10:26:49 SILL PadchatRpc rpcCall(WXHeartBeat, [])
10:26:50 SILL PadchatRpc initHeartbeat() throttleQueue.subscribe(ws.on(message))
10:26:50 SILL PuppetPadchat startWatchdog() padchatManager.on(heartbeat)
10:26:50 SILL Wechaty memoryCheck() free: 152 MB, require: 4 MB
10:26:50 SILL PadchatRpc WXHeartBeat result: {"status":0,"message":"ok"}
10:26:50 SILL PadchatRpc initWebSocket() ws.on(pong)
10:26:51 SILL PadchatRpc onSocketTencent() discard empty message msg_id payoad: {"continue":0,"msg_type":32768,"status":1,"uin":488036821}