Class GroupOperationsHandler
-
- All Implemented Interfaces:
public class GroupOperationsHandlerGroup operations handler.
Note: Call stop to release resources when done.
- Since:
5.12.0
-
-
Field Summary
Fields Modifier and Type Field Description public final static DataKey<Integer>KEY_CREATE_GROUPpublic final static DataKey<Integer>KEY_CREATE_GROUP_EXAMINEpublic final static DataKey<Integer>KEY_INVITE_USERS_TO_GROUPpublic final static DataKey<Boolean>KEY_KICK_GROUP_MEMBERSpublic final static DataKey<Boolean>KEY_UPDATE_GROUP_INFOpublic final static DataKey<Boolean>KEY_UPDATE_GROUP_INFO_EXAMINEpublic final static DataKey<Boolean>KEY_SET_GROUP_MEMBER_INFOpublic final static DataKey<Boolean>KEY_SET_GROUP_MEMBER_INFO_EXAMINEpublic final static DataKey<Boolean>KEY_QUIT_GROUPpublic final static DataKey<Boolean>KEY_DISMISS_GROUPpublic final static DataKey<Boolean>KEY_ADD_GROUP_FOLLOWSpublic final static DataKey<Boolean>KEY_REMOVE_GROUP_FOLLOWSpublic final static DataKey<Boolean>KEY_TRANSFER_GROUP_OWNERpublic final static DataKey<Boolean>KEY_ADD_GROUP_MANAGERSpublic final static DataKey<Boolean>KEY_REMOVE_GROUP_MANAGERSpublic final static DataKey<Integer>KEY_JOIN_GROUP
-
Constructor Summary
Constructors Constructor Description GroupOperationsHandler(ChannelIdentifier channelIdentifier)Constructor that initializes the group ID.
-
Method Summary
Modifier and Type Method Description voidcreateGroup(GroupInfo groupInfo, List<String> inviteeUserIds)voidcreateGroupExamine(GroupInfo groupInfo, List<String> inviteeUserIds)voidinviteUsersToGroup(List<String> userIds)Invites users to join the group. voidkickGroupMembers(List<String> userIds, LeaveGroupConfig config)Kicks members from the group. voidupdateGroupInfo(GroupInfo groupInfo)Updates the group info. voidupdateGroupInfoExamine(GroupInfo groupInfo)Updates the group info with review. voidsetGroupMemberInfo(String userId, String nickname, String extra)Sets group member info. voidsetGroupMemberInfoExamine(String userId, String nickname, String extra)Sets group member info with review. voidquitGroup(LeaveGroupConfig config)Quits the group. voiddismissGroup()Dismisses the group. voidaddGroupFollows(List<String> userIds)Adds favorited group members. voidremoveGroupFollows(List<String> userIds)Removes favorited group members. voidtransferGroupOwner(String newOwnerId, boolean quitGroup, LeaveGroupConfig config)Transfers group ownership. voidaddGroupManagers(List<String> userIds)Adds group managers. voidremoveGroupManagers(List<String> userIds)Removes group managers. voidjoinGroup()Joins the group. -
-
Method Detail
-
createGroup
@Deprecated() void createGroup(GroupInfo groupInfo, List<String> inviteeUserIds)
-
createGroupExamine
void createGroupExamine(GroupInfo groupInfo, List<String> inviteeUserIds)
-
inviteUsersToGroup
void inviteUsersToGroup(List<String> userIds)
Invites users to join the group.
- Parameters:
userIds- the list of user IDs
-
kickGroupMembers
void kickGroupMembers(List<String> userIds, LeaveGroupConfig config)
Kicks members from the group.
- Parameters:
userIds- the list of user IDsconfig- the leave group configuration
-
updateGroupInfo
@Deprecated() void updateGroupInfo(GroupInfo groupInfo)
Updates the group info.
- Parameters:
groupInfo- the group info
-
updateGroupInfoExamine
void updateGroupInfoExamine(GroupInfo groupInfo)
Updates the group info with review.
- Parameters:
groupInfo- the group info
-
setGroupMemberInfo
@Deprecated() void setGroupMemberInfo(String userId, String nickname, String extra)
Sets group member info.
- Parameters:
userId- the user IDnickname- the nicknameextra- the extra information
-
setGroupMemberInfoExamine
void setGroupMemberInfoExamine(String userId, String nickname, String extra)
Sets group member info with review.
- Parameters:
userId- the user IDnickname- the nicknameextra- the extra information
-
quitGroup
void quitGroup(LeaveGroupConfig config)
Quits the group.
- Parameters:
config- the leave group configuration
-
dismissGroup
void dismissGroup()
Dismisses the group.
-
addGroupFollows
void addGroupFollows(List<String> userIds)
Adds favorited group members.
- Parameters:
userIds- the list of user IDs- Since:
5.12.2
-
removeGroupFollows
void removeGroupFollows(List<String> userIds)
Removes favorited group members.
- Parameters:
userIds- the list of user IDs- Since:
5.12.2
-
transferGroupOwner
void transferGroupOwner(String newOwnerId, boolean quitGroup, LeaveGroupConfig config)
Transfers group ownership.
- Parameters:
newOwnerId- the new owner's user IDquitGroup- whether to quit the group after transferconfig- the leave group configuration- Since:
5.12.2
-
addGroupManagers
void addGroupManagers(List<String> userIds)
Adds group managers.
- Parameters:
userIds- the list of user IDs- Since:
5.12.2
-
removeGroupManagers
void removeGroupManagers(List<String> userIds)
Removes group managers.
- Parameters:
userIds- the list of user IDs- Since:
5.12.2
-
joinGroup
void joinGroup()
Joins the group.
The join permission determines whether the user can join directly. When the group requires approval, the RC_GROUP_JOIN_GROUP_NEED_MANAGER_ACCEPT status code is returned, indicating the user needs to wait for the owner or manager to approve.
- Since:
5.34.0
-
-
-
-