Group event notification
1 Create a group
It is Corresponding the client interface:createGroup{"action":"AEC_GROUP_CREATE","userId":"xxx","addUsers":"userId1,userId2,...","userDefineData":"xxxxx"}
userDefineData:You can decide the content according to your own business logic. For example, you can pass the group name or json data.
userId: the user ID of who requests to create a group
addUsers:A comma-separated list of group members that already contain the creator.
Return format when it creates successful:{"status":"1","data":"newGroupId"}
The parameter newGroupId is your newly created group ID.
2 Synchronize all group members
When you receive this request, you need to return all members of this groupId{"action":"AEC_GROUP_SYNC_ALL","groupId":"xxx"}
Return format when it creates successful:{
"status": "1",
"data": {
"groupList": "userId1,userIdx...",
"ignoreList": "userId1,userIdx,..."
}
}
“groupList” represents all group members of this group, which separated by commas.
“ignoreList” is a optional parameter, indicating that all group members with message do not disturbed for this group which are separated by commas. If there is no member with message do not disturbed, please do not pass this field.
3 Delete a group
It indicates that the user wants to delete the group, and you can determine whether the user has the deletion permission, such as whether it is the creator. If you have permission, delete the group data in your server.
{“action”:”AEC_GROUP_DEL”, “userId”:”xxx”,”groupId”:”xxx”}
//return {“status”:”x”}
4 Add a group member
---
It is corresponding to the client interface :addGroupMembers
```java
{"action":"AEC_GROUP_ADD_USER","userId":"xxx","groupId":"xxx","addUsers":"userId1,userId2,...","userDefineData":"xxxxx"}
//return {"status":"x"}
addUsers :It is the list of members that the user wishes to add to the group, separated by commas, and if a single user is added, there is no comma.
userDefineData:(optional),You can decide the content according to your own business logic. For example, you can pass the chat room name or json data.
5 Add group members and sync all group members
{"action" : "AEC_GROUP_ADD_USER_AND_SYNC_ALL", "userId" : "xxx","groupId":"xxx","addUsers":"userId1,userId2,...","userDefineData()":"xxxxx"} |
It is Similar to AEC_GROUP_ADD_USER, but you need to return all group members at this time, similar to AEC_GROUP_SYNC_ALL.
“groupList” represents all members of this group, and ignoreList is a optional parameter, indicating all group members that set group message do not disturb.
Group message DND means that the group’s messages will not be pushed to this user.6 Delete the group member
It is corresponding the client interface : deleteGroupMembers{"action":"AEC_GROUP_REMOVE_USER","userId":"xxx","groupId":"xxx","removeUsers":"userId1,userId2,..."}
//返回 {"status":"x"}
“removeUsers” is a list of members that the user wishes to remove from the group, separated by commas, and if a single user is deleted, there is no comma.
7 Delete group members and sync all group members
{"action":"AEC_GROUP_REMOVE_USER_AND_SYNC_ALL", "userId":"xxx","groupId":"xxx","removeUsers":"userId1,userId2,..."} |
It is similar to AEC_GROUP_REMOVE_USER, but you need to return all group members at this time, similar to AEC_GROUP_SYNC_ALL.
“groupList” represents all members of this group, and ignoreList is a optional parameter, indicating all group members that set group message do not disturb.
Group message DND means that the group’s messages will not be pushed to this user.8 Set the DND mode
{"action" : "AEC_SET_GROUP_PUSH_IGNORE", "userId" : "xxx","groupId":"xxx"} |
The user requests to set the group to be in the DND state. After the setting, the group’s message will not be pushed to this user.
9 Set DND mode and sync group members
{"action" : "AEC_SET_GROUP_PUSH_IGNORE_AND_SYNC_ALL", "userId" : "xxx","groupId":"xxx"} |
It is similar to AEC_SET_GROUP_PUSH_IGNORE, but you need to return all group members at the same time, which is similar to AEC_GROUP_SYNC_ALL.
“groupList” represents all members of this group, and ignoreList is a optional parameter, indicating all group members that sets group message do not disturb.
Group message DND means that the group’s messages will not be pushed to this user.10 Cancel DND
{"action" : "AEC_UNSET_GROUP_PUSH_IGNORE", "userId" : "xxx","groupId":"xxx"} |
The user requests to unset the group to be in the DND state, and the group’s message will be pushed to this user.
11 Cancel DND and sync group members
{"action" : "AEC_UNSET_GROUP_PUSH_IGNORE_AND_SYNC_ALL", "userId" : "xxx","groupId":"xxx"} |
It is similar to AEC_UNSET_GROUP_PUSH_IGNORE, but you need to return all group members at the same time, similar to AEC_GROUP_SYNC_ALL.
groupList表示这个groupId的所有成员,ignoreList为可选参数,表示所有开启了群消息免打扰的群成员。
“groupList” represents all members of this groupId, and ignoreList is a optional parameter, indicating all group members that set group message do not disturb.
Group message DND means that the group’s messages will not be pushed to this user.