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

🐛🐛 Bug Report: 关于contact.is_friend()返回是否是机器人好友的结果 #328

Open
xin0501 opened this issue May 1, 2022 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@xin0501
Copy link

xin0501 commented May 1, 2022

requirements

  • token type(padlocal) [required]
  • version of python-wechaty [0.8.37]
  • version of wechaty docker image [0.65]

Describe your problem

使用contact.is_friend(),提取Contact.find_all()返回结果中的机器人好友,结果不完全正确。很多是机器人好友的联系人会被检测为不是机器人的好友。

Reproduce your problem

测试代码

contacts = await self.bot.Contact.find_all()
for contact in contacts:
  # await contact.say(text[2:])
  if contact.is_friend():
      await from_contact.say(f"此账号为微信好友:{contact.name}")
  else:
      await from_contact.say(f"此账号不是微信好友:{contact.name}")

Your experiments

很多好友,我已经双向确认过了,确实是机器人的好友,但是实际返回的结果为,此账号不是微信好友。不知道我哪里做的不对。

@xin0501 xin0501 added the 🐛 bug Something isn't working label May 1, 2022
@wj-Mcat
Copy link
Collaborator

wj-Mcat commented May 1, 2022

The info of contact is fetched from server of puppet servicer, so if there is wrong info, python-wechaty can do nothing but puppet servicer, eg: @padlocal .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants