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:WXwork接收好友申请后wechaty报internal error<list index out of range> #367

Open
bigbrother666sh opened this issue Sep 2, 2022 · 2 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@bigbrother666sh
Copy link

requirements

  • token type: wxwork
  • wechaty:0.8.66

Describe your problem

当接受到 FriendshipType.FRIENDSHIP_TYPE_RECEIVE 并处理通过后
wechaty随即报错 internal error
【看起来好像wxwork的friendship 的类型比普通微信多?所以枚举出现问题?】

Reproduce your problem

        if friendship.type() == FriendshipType.FRIENDSHIP_TYPE_RECEIVE:
            contact = friendship.contact()
            for key, _list in self.valitated_users.items():
                if contact.contact_id in _list:
                    await friendship.accept()
                    return
@bigbrother666sh bigbrother666sh added the 🐛 bug Something isn't working label Sep 2, 2022
@bigbrother666sh
Copy link
Author

发现普通用户如果把企微用户删了,之后再添加,貌似会出现一种新的 friendship type……

2022-09-02 21:54:45,166 - Wechaty - INFO - receive <ready> event <EventReadyPayload(data='ready')>
2022-09-02 21:54:50,980 - Wechaty - INFO - receive <friendship> event <EventFriendshipPayload(friendship_id='e9d14199-2e11-4504-b8a1-150ce37881a2')>
2022-09-02 21:54:50,981 - FriendShip - INFO - Friendship constructor e9d14199-2e11-4504-b8a1-150ce37881a2
2022-09-02 21:54:50,981 - FriendShip - INFO - ready() sync the friendship payload
2022-09-02 21:54:51,022 - Wechaty - ERROR - internal error <5 is not a valid FriendshipType>

@wj-Mcat
Copy link
Collaborator

wj-Mcat commented Sep 4, 2022

It seems that the MessageType is not align with the reponse from wxwork. It's actually a bug, we will check it later.

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