diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 98d4ac98b..7d0efcc32 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -50,6 +50,8 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq { case constant.Video: fallthrough case constant.File: + fallthrough + case constant.AdvancedRevoke: newContent = utils.StructToJsonString(params.Content) case constant.Revoke: newContent = params.Content["revokeMsgClientID"].(string) @@ -145,6 +147,8 @@ func ManagementSendMsg(c *gin.Context) { data = CustomElem{} case constant.Revoke: data = RevokeElem{} + case constant.AdvancedRevoke: + data = MessageRevoked{} case constant.OANotification: data = OANotificationElem{} params.SessionType = constant.NotificationChatType @@ -189,7 +193,7 @@ func ManagementSendMsg(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) return } - case constant.GroupChatType: + case constant.GroupChatType, constant.SuperGroupChatType: if len(params.GroupID) == 0 { log.NewError(params.OperationID, "groupID is a null string") c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) @@ -473,3 +477,10 @@ type OANotificationElem struct { FileElem FileElem `mapstructure:"fileElem" json:"fileElem"` Ex string `mapstructure:"ex" json:"ex"` } +type MessageRevoked struct { + RevokerID string `mapstructure:"notificationName" json:"revokerID" validate:"required"` + RevokerRole int32 `mapstructure:"notificationName" json:"revokerRole" validate:"required"` + ClientMsgID string `mapstructure:"notificationName" json:"clientMsgID" validate:"required"` + RevokerNickname string `mapstructure:"notificationName" json:"revokerNickname"` + SessionType int32 `mapstructure:"notificationName" json:"sessionType" validate:"required"` +} diff --git a/internal/push/getui/push.go b/internal/push/getui/push.go index 69b4584f9..359d847f0 100644 --- a/internal/push/getui/push.go +++ b/internal/push/getui/push.go @@ -133,7 +133,7 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, operationID stri } pushReq.PushMessage.Notification = Notification{ Title: alert, - Body: alert, + Body: detailContent, ClickType: "startapp", } pushReq.PushChannel.Ios.Aps.Sound = "default" @@ -152,10 +152,10 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, operationID stri ChannelID string `json:"/message/android/notification/channel_id"` Sound string `json:"/message/android/notification/sound"` Importance string `json:"/message/android/notification/importance"` - }{ChannelID: "RingRing4", Sound: "/raw/ring001", Importance: "importance"}, + }{ChannelID: "RingRing4", Sound: "/raw/ring001", Importance: "NORMAL"}, XM: struct { ChannelID string `json:"/extra.channel_id"` - }{ChannelID: "Default"}, + }{ChannelID: "high_system"}, } pushResp := PushResp{} err = g.request(PushURL, pushReq, token, &pushResp, operationID) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index fa4f8afb2..49b3fdfe7 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -94,6 +94,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) { var content string if pushMsg.MsgData.OfflinePushInfo != nil { content = pushMsg.MsgData.OfflinePushInfo.Title + jsonCustomContent = pushMsg.MsgData.OfflinePushInfo.Desc } else { switch pushMsg.MsgData.ContentType { @@ -225,6 +226,7 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) { var content string if pushMsg.MsgData.OfflinePushInfo != nil { content = pushMsg.MsgData.OfflinePushInfo.Title + jsonCustomContent = pushMsg.MsgData.OfflinePushInfo.Desc } else { switch pushMsg.MsgData.ContentType { diff --git a/pkg/proto/rtc/rtc.proto b/pkg/proto/rtc/rtc.proto index cb99f9b84..aafc9345f 100644 --- a/pkg/proto/rtc/rtc.proto +++ b/pkg/proto/rtc/rtc.proto @@ -100,6 +100,7 @@ message SignalReq { SignalAcceptReq accept = 4; SignalHungUpReq hungUp = 5; SignalRejectReq reject = 6; + SignalGetRoomByGroupIDReq GetRoomByGroupID = 7; } } @@ -111,6 +112,7 @@ message SignalResp { SignalAcceptReply accept = 4; SignalHungUpReply hungUp = 5; SignalRejectReply reject = 6; + SignalGetRoomByGroupIDReply GetRoomByGroupID = 7; } } @@ -203,6 +205,19 @@ message SignalRejectReply { } +message SignalGetRoomByGroupIDReq { + string opUserID = 1; + string groupID = 2; +} + +message SignalGetRoomByGroupIDReply { + InvitationInfo invitation = 1; + repeated string onConnectingUserIDList = 2; + string token = 3; + string roomID = 4; + string liveURL = 5; +} + message SignalMessageAssembleReq { SignalReq signalReq = 1; string operationID = 2;