mute group

This commit is contained in:
skiffer-git
2022-03-29 11:48:17 +08:00
parent 6de569537f
commit 1aeff25316
7 changed files with 209 additions and 12 deletions
+35
View File
@@ -185,3 +185,38 @@ type DismissGroupReq struct {
type DismissGroupResp struct {
CommResp
}
type MuteGroupMemberReq struct {
OperationID string `json:"operationID" binding:"required"`
GroupID string `json:"groupID" binding:"required"`
UserID string `json:"userID" binding:"required"`
MutedSeconds uint32 `json:"mutedSeconds" binding:"required"`
}
type MuteGroupMemberResp struct {
CommResp
}
type CancelMuteGroupMemberReq struct {
OperationID string `json:"operationID" binding:"required"`
GroupID string `json:"groupID" binding:"required"`
UserID string `json:"userID" binding:"required"`
}
type CancelMuteGroupMemberResp struct {
CommResp
}
type MuteGroupReq struct {
OperationID string `json:"operationID" binding:"required"`
GroupID string `json:"groupID" binding:"required"`
}
type MuteGroupResp struct {
CommResp
}
type CancelMuteGroupReq struct {
OperationID string `json:"operationID" binding:"required"`
GroupID string `json:"groupID" binding:"required"`
}
type CancelMuteGroupResp struct {
CommResp
}
+1
View File
@@ -79,6 +79,7 @@ const (
MemberInvitedNotification = 1509
MemberEnterNotification = 1510
GroupDismissedNotification = 1511
GroupMemberInfoChangedNotification = 1512
SignalingNotificationBegin = 1600
SignalingNotification = 1601
+3
View File
@@ -119,6 +119,9 @@ func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *db.Group
}
dst.JoinTime = int32(src.JoinTime.Unix())
dst.MuteEndTime = uint32(src.JoinTime.Unix())
if dst.MuteEndTime < uint32(time.Now().Unix()) {
dst.MuteEndTime = 0
}
return nil
}