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

Support RoomInvitation receive & accept #15

Open
Tracked by #12
huan opened this issue Oct 13, 2021 · 6 comments
Open
Tracked by #12

Support RoomInvitation receive & accept #15

huan opened this issue Oct 13, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Oct 13, 2021

To support

@anaivebird
Copy link
Collaborator

Currently, if your account is friend of our bot, inviting bot to some group will be accepted automatically(by qq). No acceptance is needed.

@huan
Copy link
Member Author

huan commented Oct 17, 2021

Currently, if your account is friend of our bot, inviting bot to some group will be accepted automatically(by qq). No acceptance is needed.

If a developer wants to use their QQ account to join the QQ group, then they will need to add friend with Friday BOT at first.

  1. Could our puppet OICQ deal with this friendship request for now?
  2. Or, do you mean that Friday BOT can invite a non-friend QQ number to our group?

@anaivebird
Copy link
Collaborator

anaivebird commented Oct 17, 2021

  1. OICQ could deal with friendship request, but I don't know how to write a ding-dong bot that could accept friendship request automatically with wechaty's api.
  2. We could only invite friend into our group. So add bot as friend is needed.
  3. If bot is administrator of the group, oicq could receive add QQ group request and accept automatically.(It seems that wechaty has no accept joining group API.)(Also, to be simple, we could set a password for QQ group, anyone knows the password could add our group automatically)

@huan
Copy link
Member Author

huan commented Oct 17, 2021

OICQ could deal with friendship request, but I don't know how to write a ding-dong bot that could accept friendship request automatically with wechaty's API.

The Wechaty has Friendship API and it's very easy to use, you can read our plugin code at here

It seems that wechaty has no accept joining group API.

Wechaty has a RoomInvitation API for accepting the room invitation. Please refer to the source code at here, and all the Puppet API is started from the roomInvitation prefix, for example: abstract roomInvitationAccept (roomInvitationId: string): Promise

@anaivebird
Copy link
Collaborator

RoomInvitation means inviting bot to join a new group, and bot accepts it, or bot is the administrator of a group and accept join goup request?

@huan
Copy link
Member Author

huan commented Oct 17, 2021

Oh, yes you are correct.

I think what we need should be Room.add(), see: https://wechaty.js.org/docs/api/room#roomaddcontact--promise-void

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants