mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 02:26:00 +08:00
superGroup
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
package base_info
|
||||
|
||||
type GetJoinedSuperGroupReq struct {
|
||||
type GetJoinedSuperGroupListReq struct {
|
||||
GetJoinedGroupListReq
|
||||
}
|
||||
|
||||
type GetJoinedSuperGroupResp struct {
|
||||
type GetJoinedSuperGroupListResp struct {
|
||||
GetJoinedGroupListResp
|
||||
}
|
||||
|
||||
type GetSuperGroupsInfoReq struct {
|
||||
GetGroupInfoReq
|
||||
}
|
||||
|
||||
type GetSuperGroupsInfoResp struct {
|
||||
GetGroupInfoResp
|
||||
}
|
||||
|
||||
@@ -1026,7 +1026,11 @@ func (d *DataBases) AddUserToSuperGroup(groupID string, userIDList []string) err
|
||||
UserID: v,
|
||||
})
|
||||
}
|
||||
_, err = c.UpdateMany(sCtx, users, bson.M{"$addToSet": bson.M{"group_id_list": groupID}})
|
||||
upsert := true
|
||||
opts := &options.UpdateOptions{
|
||||
Upsert: &upsert,
|
||||
}
|
||||
_, err = c.UpdateMany(sCtx, bson.M{"user_id": bson.M{"$in": userIDList}}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts)
|
||||
if err != nil {
|
||||
session.AbortTransaction(ctx)
|
||||
return utils.Wrap(err, "transaction failed")
|
||||
|
||||
+345
-207
File diff suppressed because it is too large
Load Diff
@@ -401,6 +401,16 @@ message GetJoinedSuperGroupListResp {
|
||||
repeated server_api_params.GroupInfo GroupList = 3;
|
||||
}
|
||||
|
||||
message GetSuperGroupsInfoReq {
|
||||
repeated string GroupIDList = 1;
|
||||
string OperationID = 2;
|
||||
string OpUserID = 3; //No verification permission
|
||||
}
|
||||
|
||||
message GetSuperGroupsInfoResp {
|
||||
CommonResp commonResp = 1;
|
||||
repeated server_api_params.GroupInfo GroupInfoList = 3;
|
||||
}
|
||||
|
||||
service group{
|
||||
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
|
||||
@@ -438,6 +448,7 @@ service group{
|
||||
rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp);
|
||||
|
||||
rpc GetJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp);
|
||||
rpc GetSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user