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

Fix room.add() failed when room member more than 40 #1374

Merged
merged 5 commits into from Jun 21, 2018

Conversation

lijiarui
Copy link
Member

see wechaty/wechaty-puppet-padchat#70

  • When member more than 40, use WXInviteChatRoomMember
  • When member less than 40, use WXAddChatRoomMember

So add WXInviteChatRoomMember in RPC function.

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that I had guessed right about the difference between them.

* If room member more than 40
* Need call `WXInviteChatRoomMember` instead `WXAddChatRoomMember`
*/
if (result.status === -2012) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no magic number please.

@lijiarui
Copy link
Member Author

WXRoomAddTypeStatus type, maybe need to fill more in the future.

export enum WXRoomAddTypeStatus {
  Done          = 0,
  NeedInvite    = -2012,
  InviteConfirm = -2028,
}

@huan huan merged commit 9e91706 into wechaty:master Jun 21, 2018
@lijiarui lijiarui deleted the add-WXInviteChatRoomMember branch July 30, 2018 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants