From a743a2cfd2ed9193162461ad12d8ca93969f299c Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Fri, 3 Mar 2023 19:02:09 +0800 Subject: [PATCH 1/2] solve error --- pkg/apistruct/msg.go | 14 +++++------ pkg/apistruct/user.go | 58 ------------------------------------------- 2 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 pkg/apistruct/user.go diff --git a/pkg/apistruct/msg.go b/pkg/apistruct/msg.go index 74b2a37cb..e7d926d19 100644 --- a/pkg/apistruct/msg.go +++ b/pkg/apistruct/msg.go @@ -75,12 +75,12 @@ type ModifyMessageReactionExtensionsResp struct { } `json:"data"` } -type OperateMessageListReactionExtensionsReq struct { - OperationID string `json:"operationID" binding:"required"` - SourceID string `json:"sourceID" binding:"required"` - SessionType string `json:"sessionType" binding:"required"` - MessageReactionKeyList []*msg.GetMessageListReactionExtensionsReq_MessageReactionKey `json:"messageReactionKeyList" binding:"required"` -} +//type OperateMessageListReactionExtensionsReq struct { +// OperationID string `json:"operationID" binding:"required"` +// SourceID string `json:"sourceID" binding:"required"` +// SessionType string `json:"sessionType" binding:"required"` +// MessageReactionKeyList []*msg.GetMessageListReactionExtensionsReq_MessageReactionKey `json:"messageReactionKeyList" binding:"required"` +//} type OperateMessageListReactionExtensionsResp struct { CommResp @@ -94,7 +94,7 @@ type SetMessageReactionExtensionsCallbackReq ModifyMessageReactionExtensionsReq type SetMessageReactionExtensionsCallbackResp ModifyMessageReactionExtensionsResp -type GetMessageListReactionExtensionsReq OperateMessageListReactionExtensionsReq +//type GetMessageListReactionExtensionsReq OperateMessageListReactionExtensionsReq type GetMessageListReactionExtensionsResp struct { CommResp diff --git a/pkg/apistruct/user.go b/pkg/apistruct/user.go deleted file mode 100644 index 4b7260e9f..000000000 --- a/pkg/apistruct/user.go +++ /dev/null @@ -1,58 +0,0 @@ -package apistruct - -import ( - sdkws "OpenIM/pkg/proto/sdkws" -) - -type GetUsersInfoReq struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required"` -} -type GetUsersInfoResp struct { - CommResp - UserInfoList []*sdkws.PublicUserInfo `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type UpdateSelfUserInfoReq struct { - ApiUserInfo - OperationID string `json:"operationID" binding:"required"` -} -type SetGlobalRecvMessageOptReq struct { - OperationID string `json:"operationID" binding:"required"` - GlobalRecvMsgOpt *int32 `json:"globalRecvMsgOpt" binding:"omitempty,oneof=0 1 2"` -} -type SetGlobalRecvMessageOptResp struct { - CommResp -} -type UpdateUserInfoResp struct { - CommResp -} - -type GetSelfUserInfoReq struct { - OperationID string `json:"operationID" binding:"required"` - UserID string `json:"userID" binding:"required"` -} -type GetSelfUserInfoResp struct { - CommResp - UserInfo *sdkws.UserInfo `json:"-"` - Data map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type GetFriendIDListFromCacheReq struct { - OperationID string `json:"operationID" binding:"required"` -} - -type GetFriendIDListFromCacheResp struct { - CommResp - UserIDList []string `json:"userIDList" binding:"required"` -} - -type GetBlackIDListFromCacheReq struct { - OperationID string `json:"operationID" binding:"required"` -} - -type GetBlackIDListFromCacheResp struct { - CommResp - UserIDList []string `json:"userIDList" binding:"required"` -} From b2ea5036dbbfa33f5c621b4c841a56b6a769cd0a Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Fri, 3 Mar 2023 19:05:57 +0800 Subject: [PATCH 2/2] solve error --- pkg/common/db/unrelation/super_group.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/common/db/unrelation/super_group.go b/pkg/common/db/unrelation/super_group.go index 3e773141a..2a99f3008 100644 --- a/pkg/common/db/unrelation/super_group.go +++ b/pkg/common/db/unrelation/super_group.go @@ -1,14 +1,12 @@ package unrelation import ( - "OpenIM/pkg/common/config" "OpenIM/pkg/common/db/table/unrelation" "OpenIM/pkg/utils" "context" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/mongo/readconcern" ) func NewSuperGroupMongoDriver(database *mongo.Database) unrelation.SuperGroupModelInterface { @@ -75,6 +73,7 @@ func (s *SuperGroupMongoDriver) AddUserToSuperGroup(ctx context.Context, groupID return utils.Wrap(err, "transaction failed") } } + return nil } func (s *SuperGroupMongoDriver) RemoverUserFromSuperGroup(ctx context.Context, groupID string, userIDs []string) error {