Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release

pull/351/head
skiffer-git 2 years ago
commit dd001ab0e7

@ -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"`
}

@ -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)

@ -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 {

@ -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;

Loading…
Cancel
Save