-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Important:Please file the issue follow the template, or we won't help you to solve the problem.
0. Report Issue Guide
- Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json
rm -rf node_modules
npm install
-
Please search in FAQ List first, and make sure your problem has not been solved before.
-
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
-
What is your wechaty version?
Answer:0.39.26 -
Which puppet are you using for wechaty? (padchat/puppeteer/padpro/...)
Answer:donut -
What is your wechaty-puppet-XXX(padchat/puppeteer/) version?
Answer:0.3.19 -
What is your node version? (run
node --version
)
Answer:10.16.0 -
What os are you using
Answer:MacOS
2. Describe the bug
Give a clear and concise description of what the bug is.
Now we can get alias from payload, but if the payload is not the real-time, it will make the alias not real-time.
Due to wechaty-puppet-donut
can not post real-time data when something modified, so maybe we should do some change for method alias()
in Contact
.
BTW, the method contactAlias(contactId)
in wechaty-puppet
has never been used due to we get alias from payload rather than this method.
3. To Reproduce
This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.
Steps to reproduce the behavior:
- run hosite for donut
- modified contact alias in WeChat App
- get contact alias in wechaty
4. Expected behavior
Give a clear and concise description of what you expected to happen.
if (typeof newAlias === 'undefined') {
return this.payload.alias || null
}
change it to:
if (typeof newAlias === 'undefined') {
return this.puppet.contactAlias(this.id)
}
Reasons
- it is not a breaking change for existed puppet neither
- could sync contact in base level
- make the puppet method
contactAlias(contactId)
make sense
I have test it in my local env, everything work as expected so far.
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.
Can not get the real-time contact alias.