mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 17:45:59 +08:00
Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release
This commit is contained in:
@@ -16,7 +16,7 @@ type CommDataResp struct {
|
||||
|
||||
type KickGroupMemberReq struct {
|
||||
GroupID string `json:"groupID" binding:"required"`
|
||||
KickedUserIDList []string `json:"kickedUserIDList" binding:"required"`
|
||||
KickedUserIDList []string `json:"kickedUserIDList" binding:"required, min=1, max=100"`
|
||||
Reason string `json:"reason"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
@@ -38,7 +38,7 @@ type GetGroupMembersInfoResp struct {
|
||||
|
||||
type InviteUserToGroupReq struct {
|
||||
GroupID string `json:"groupID" binding:"required"`
|
||||
InvitedUserIDList []string `json:"invitedUserIDList" binding:"required"`
|
||||
InvitedUserIDList []string `json:"invitedUserIDList" binding:"required, min=1, max=100"`
|
||||
Reason string `json:"reason"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
|
||||
@@ -35,8 +35,6 @@ func InsertIntoGroupMember(toInsertInfo db.GroupMember) error {
|
||||
}
|
||||
|
||||
func BatchInsertIntoGroupMember(toInsertInfoList []*db.GroupMember) error {
|
||||
//MessageList []*model_struct.LocalChatLog
|
||||
//return utils.Wrap(d.conn.Create(MessageList).Error, "BatchInsertMessageList failed")
|
||||
for _, toInsertInfo := range toInsertInfoList {
|
||||
toInsertInfo.JoinTime = time.Now()
|
||||
if toInsertInfo.RoleLevel == 0 {
|
||||
|
||||
@@ -107,3 +107,15 @@ func int64ToString(i int64) string {
|
||||
func Int64ToString(i int64) string {
|
||||
return strconv.FormatInt(i, 10)
|
||||
}
|
||||
|
||||
func RemoveDuplicateElement(idList []string) []string {
|
||||
result := make([]string, 0, len(idList))
|
||||
temp := map[string]struct{}{}
|
||||
for _, item := range idList {
|
||||
if _, ok := temp[item]; !ok {
|
||||
temp[item] = struct{}{}
|
||||
result = append(result, item)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user