This commit is contained in:
wangchuxiao 2023-03-09 20:05:18 +08:00
parent 745c96349d
commit 549a0aceb0
4 changed files with 160 additions and 208 deletions

View File

@ -7,6 +7,7 @@ import (
"OpenIM/pkg/common/config" "OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant" "OpenIM/pkg/common/constant"
"OpenIM/pkg/common/log" "OpenIM/pkg/common/log"
"OpenIM/pkg/common/tracelog"
"OpenIM/pkg/discoveryregistry" "OpenIM/pkg/discoveryregistry"
"OpenIM/pkg/errs" "OpenIM/pkg/errs"
"OpenIM/pkg/proto/msg" "OpenIM/pkg/proto/msg"
@ -31,14 +32,14 @@ type Msg struct {
validate *validator.Validate validate *validator.Validate
} }
func SetOptions(options map[string]bool, value bool) { func (Msg) SetOptions(options map[string]bool, value bool) {
utils.SetSwitchFromOptions(options, constant.IsHistory, value) utils.SetSwitchFromOptions(options, constant.IsHistory, value)
utils.SetSwitchFromOptions(options, constant.IsPersistent, value) utils.SetSwitchFromOptions(options, constant.IsPersistent, value)
utils.SetSwitchFromOptions(options, constant.IsSenderSync, value) utils.SetSwitchFromOptions(options, constant.IsSenderSync, value)
utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, value) utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, value)
} }
func newUserSendMsgReq(params *apistruct.ManagementSendMsgReq) *msg.SendMsgReq { func (m Msg) newUserSendMsgReq(c *gin.Context, params *apistruct.ManagementSendMsgReq) *msg.SendMsgReq {
var newContent string var newContent string
var err error var err error
switch params.ContentType { switch params.ContentType {
@ -66,17 +67,16 @@ func newUserSendMsgReq(params *apistruct.ManagementSendMsgReq) *msg.SendMsgReq {
} }
options := make(map[string]bool, 5) options := make(map[string]bool, 5)
if params.IsOnlineOnly { if params.IsOnlineOnly {
SetOptions(options, false) m.SetOptions(options, false)
} }
if params.NotOfflinePush { if params.NotOfflinePush {
utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false)
} }
if params.ContentType == constant.CustomOnlineOnly { if params.ContentType == constant.CustomOnlineOnly {
SetOptions(options, false) m.SetOptions(options, false)
} else if params.ContentType == constant.CustomNotTriggerConversation { } else if params.ContentType == constant.CustomNotTriggerConversation {
utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, false) utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, false)
} }
pbData := msg.SendMsgReq{ pbData := msg.SendMsgReq{
MsgData: &sdkws.MsgData{ MsgData: &sdkws.MsgData{
SendID: params.SendID, SendID: params.SendID,
@ -100,91 +100,87 @@ func newUserSendMsgReq(params *apistruct.ManagementSendMsgReq) *msg.SendMsgReq {
tips.JsonDetail = utils.StructToJsonString(params.Content) tips.JsonDetail = utils.StructToJsonString(params.Content)
pbData.MsgData.Content, err = proto.Marshal(&tips) pbData.MsgData.Content, err = proto.Marshal(&tips)
if err != nil { if err != nil {
log.Error(params.OperationID, "Marshal failed ", err.Error(), tips.String()) log.Error(tracelog.GetOperationID(c), "Marshal failed ", err.Error(), tips.String())
} }
} }
return &pbData return &pbData
} }
func (o *Msg) client() (msg.MsgClient, error) { func (m *Msg) client() (msg.MsgClient, error) {
conn, err := o.c.GetConn(config.Config.RpcRegisterName.OpenImMsgName) conn, err := m.c.GetConn(config.Config.RpcRegisterName.OpenImMsgName)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return msg.NewMsgClient(conn), nil return msg.NewMsgClient(conn), nil
} }
func (o *Msg) GetSeq(c *gin.Context) { func (m *Msg) GetSeq(c *gin.Context) {
a2r.Call(msg.MsgClient.GetMaxAndMinSeq, o.client, c) a2r.Call(msg.MsgClient.GetMaxAndMinSeq, m.client, c)
} }
func (o *Msg) SendMsg(c *gin.Context) { func (m *Msg) PullMsgBySeqs(c *gin.Context) {
a2r.Call(msg.MsgClient.SendMsg, o.client, c) a2r.Call(msg.MsgClient.PullMessageBySeqs, m.client, c)
} }
func (o *Msg) PullMsgBySeqs(c *gin.Context) { func (m *Msg) DelMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.PullMessageBySeqs, o.client, c) a2r.Call(msg.MsgClient.DelMsgs, m.client, c)
} }
func (o *Msg) DelMsg(c *gin.Context) { func (m *Msg) DelSuperGroupMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.DelMsgs, o.client, c) a2r.Call(msg.MsgClient.DelSuperGroupMsg, m.client, c)
} }
func (o *Msg) DelSuperGroupMsg(c *gin.Context) { func (m *Msg) ClearMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.DelSuperGroupMsg, o.client, c) a2r.Call(msg.MsgClient.ClearMsg, m.client, c)
} }
func (o *Msg) ClearMsg(c *gin.Context) { func (m *Msg) SetMessageReactionExtensions(c *gin.Context) {
a2r.Call(msg.MsgClient.ClearMsg, o.client, c) a2r.Call(msg.MsgClient.SetMessageReactionExtensions, m.client, c)
} }
func (o *Msg) SetMessageReactionExtensions(c *gin.Context) { func (m *Msg) GetMessageListReactionExtensions(c *gin.Context) {
a2r.Call(msg.MsgClient.SetMessageReactionExtensions, o.client, c) a2r.Call(msg.MsgClient.GetMessagesReactionExtensions, m.client, c)
} }
func (o *Msg) GetMessageListReactionExtensions(c *gin.Context) { func (m *Msg) AddMessageReactionExtensions(c *gin.Context) {
a2r.Call(msg.MsgClient.GetMessagesReactionExtensions, o.client, c) a2r.Call(msg.MsgClient.AddMessageReactionExtensions, m.client, c)
} }
func (o *Msg) AddMessageReactionExtensions(c *gin.Context) { func (m *Msg) DeleteMessageReactionExtensions(c *gin.Context) {
a2r.Call(msg.MsgClient.AddMessageReactionExtensions, o.client, c) a2r.Call(msg.MsgClient.DeleteMessageReactionExtensions, m.client, c)
} }
func (o *Msg) DeleteMessageReactionExtensions(c *gin.Context) { func (m *Msg) SendMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.DeleteMessageReactionExtensions, o.client, c)
}
func (o *Msg) ManagementSendMsg(c *gin.Context) {
var data interface{}
params := apistruct.ManagementSendMsgReq{} params := apistruct.ManagementSendMsgReq{}
if err := c.BindJSON(&params); err != nil { if err := c.BindJSON(&params); err != nil {
apiresp.GinError(c, err) apiresp.GinError(c, err)
return return
} }
var data interface{}
switch params.ContentType { switch params.ContentType {
case constant.Text: case constant.Text:
data = TextElem{} data = apistruct.TextElem{}
case constant.Picture: case constant.Picture:
data = PictureElem{} data = apistruct.PictureElem{}
case constant.Voice: case constant.Voice:
data = SoundElem{} data = apistruct.SoundElem{}
case constant.Video: case constant.Video:
data = VideoElem{} data = apistruct.VideoElem{}
case constant.File: case constant.File:
data = FileElem{} data = apistruct.FileElem{}
case constant.Custom: case constant.Custom:
data = CustomElem{} data = apistruct.CustomElem{}
case constant.Revoke: case constant.Revoke:
data = RevokeElem{} data = apistruct.RevokeElem{}
case constant.AdvancedRevoke: case constant.AdvancedRevoke:
data = MessageRevoked{} data = apistruct.MessageRevoked{}
case constant.OANotification: case constant.OANotification:
data = OANotificationElem{} data = apistruct.OANotificationElem{}
params.SessionType = constant.NotificationChatType params.SessionType = constant.NotificationChatType
case constant.CustomNotTriggerConversation: case constant.CustomNotTriggerConversation:
data = CustomElem{} data = apistruct.CustomElem{}
case constant.CustomOnlineOnly: case constant.CustomOnlineOnly:
data = CustomElem{} data = apistruct.CustomElem{}
//case constant.HasReadReceipt: //case constant.HasReadReceipt:
//case constant.Typing: //case constant.Typing:
//case constant.Quote: //case constant.Quote:
@ -195,11 +191,10 @@ func (o *Msg) ManagementSendMsg(c *gin.Context) {
if err := mapstructure.WeakDecode(params.Content, &data); err != nil { if err := mapstructure.WeakDecode(params.Content, &data); err != nil {
apiresp.GinError(c, errs.ErrData) apiresp.GinError(c, errs.ErrData)
return return
} else if err := o.validate.Struct(data); err != nil { } else if err := m.validate.Struct(data); err != nil {
apiresp.GinError(c, errs.ErrData) apiresp.GinError(c, errs.ErrData)
return return
} }
log.NewInfo(params.OperationID, data, params)
switch params.SessionType { switch params.SessionType {
case constant.SingleChatType: case constant.SingleChatType:
if len(params.RecvID) == 0 { if len(params.RecvID) == 0 {
@ -212,132 +207,43 @@ func (o *Msg) ManagementSendMsg(c *gin.Context) {
return return
} }
} }
log.NewInfo(params.OperationID, "Ws call success to ManagementSendMsgReq", params) pbReq := m.newUserSendMsgReq(c, &params)
pbData := newUserSendMsgReq(&params) conn, err := m.c.GetConn(config.Config.RpcRegisterName.OpenImMsgName)
conn, err := o.c.GetConn(config.Config.RpcRegisterName.OpenImMsgName)
if err != nil { if err != nil {
apiresp.GinError(c, errs.ErrInternalServer) apiresp.GinError(c, errs.ErrInternalServer)
return return
} }
client := msg.NewMsgClient(conn) client := msg.NewMsgClient(conn)
log.Info(params.OperationID, "", "api ManagementSendMsg call, api call rpc...") var status int
//var status int32 respPb, err := client.SendMsg(c, pbReq)
RpcResp, err := client.SendMsg(context.Background(), pbData)
if err != nil { if err != nil {
//status = constant.MsgSendFailed status = constant.MsgSendFailed
apiresp.GinError(c, err) apiresp.GinError(c, err)
return return
} }
//status = constant.MsgSendSuccessed status = constant.MsgSendSuccessed
//_, err2 := client.SetSendMsgStatus(context.Background(), &msg.SetSendMsgStatusReq{OperationID: params.OperationID, Status: status}) _, err = client.SetSendMsgStatus(c, &msg.SetSendMsgStatusReq{
//if err2 != nil { Status: int32(status),
// log.NewError(params.OperationID, utils.GetSelfFuncName(), err2.Error()) })
//} if err != nil {
log.Info(params.OperationID, "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String()) log.NewError(tracelog.GetOperationID(c), "SetSendMsgStatus failed")
resp := apistruct.ManagementSendMsgResp{ResultList: sdkws.UserSendMsgResp{ServerMsgID: RpcResp.ServerMsgID, ClientMsgID: RpcResp.ClientMsgID, SendTime: RpcResp.SendTime}} }
log.Info(params.OperationID, "ManagementSendMsg return", resp) resp := apistruct.ManagementSendMsgResp{ResultList: sdkws.UserSendMsgResp{ServerMsgID: respPb.ServerMsgID, ClientMsgID: respPb.ClientMsgID, SendTime: respPb.SendTime}}
apiresp.GinSuccess(c, resp) apiresp.GinSuccess(c, resp)
} }
func (o *Msg) ManagementBatchSendMsg(c *gin.Context) { func (m *Msg) ManagementBatchSendMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.SendMsg, o.client, c) a2r.Call(msg.MsgClient.SendMsg, m.client, c)
} }
func (o *Msg) CheckMsgIsSendSuccess(c *gin.Context) { func (m *Msg) CheckMsgIsSendSuccess(c *gin.Context) {
a2r.Call(msg.MsgClient.GetSendMsgStatus, o.client, c) a2r.Call(msg.MsgClient.GetSendMsgStatus, m.client, c)
} }
func (o *Msg) GetUsersOnlineStatus(c *gin.Context) { func (m *Msg) GetUsersOnlineStatus(c *gin.Context) {
a2r.Call(msg.MsgClient.GetSendMsgStatus, o.client, c) a2r.Call(msg.MsgClient.GetSendMsgStatus, m.client, c)
} }
func (o *Msg) AccountCheck(c *gin.Context) { func (m *Msg) AccountCheck(c *gin.Context) {
a2r.Call(msg.MsgClient.GetSendMsgStatus, o.client, c) a2r.Call(msg.MsgClient.GetSendMsgStatus, m.client, c)
}
type PictureBaseInfo struct {
UUID string `mapstructure:"uuid"`
Type string `mapstructure:"type" `
Size int64 `mapstructure:"size" `
Width int32 `mapstructure:"width" `
Height int32 `mapstructure:"height"`
Url string `mapstructure:"url" `
}
type PictureElem struct {
SourcePath string `mapstructure:"sourcePath"`
SourcePicture PictureBaseInfo `mapstructure:"sourcePicture"`
BigPicture PictureBaseInfo `mapstructure:"bigPicture" `
SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"`
}
type SoundElem struct {
UUID string `mapstructure:"uuid"`
SoundPath string `mapstructure:"soundPath"`
SourceURL string `mapstructure:"sourceUrl"`
DataSize int64 `mapstructure:"dataSize"`
Duration int64 `mapstructure:"duration"`
}
type VideoElem struct {
VideoPath string `mapstructure:"videoPath"`
VideoUUID string `mapstructure:"videoUUID"`
VideoURL string `mapstructure:"videoUrl"`
VideoType string `mapstructure:"videoType"`
VideoSize int64 `mapstructure:"videoSize"`
Duration int64 `mapstructure:"duration"`
SnapshotPath string `mapstructure:"snapshotPath"`
SnapshotUUID string `mapstructure:"snapshotUUID"`
SnapshotSize int64 `mapstructure:"snapshotSize"`
SnapshotURL string `mapstructure:"snapshotUrl"`
SnapshotWidth int32 `mapstructure:"snapshotWidth"`
SnapshotHeight int32 `mapstructure:"snapshotHeight"`
}
type FileElem struct {
FilePath string `mapstructure:"filePath"`
UUID string `mapstructure:"uuid"`
SourceURL string `mapstructure:"sourceUrl"`
FileName string `mapstructure:"fileName"`
FileSize int64 `mapstructure:"fileSize"`
}
type AtElem struct {
Text string `mapstructure:"text"`
AtUserList []string `mapstructure:"atUserList"`
IsAtSelf bool `mapstructure:"isAtSelf"`
}
type LocationElem struct {
Description string `mapstructure:"description"`
Longitude float64 `mapstructure:"longitude"`
Latitude float64 `mapstructure:"latitude"`
}
type CustomElem struct {
Data string `mapstructure:"data" validate:"required"`
Description string `mapstructure:"description"`
Extension string `mapstructure:"extension"`
}
type TextElem struct {
Text string `mapstructure:"text" validate:"required"`
}
type RevokeElem struct {
RevokeMsgClientID string `mapstructure:"revokeMsgClientID" validate:"required"`
}
type OANotificationElem struct {
NotificationName string `mapstructure:"notificationName" json:"notificationName" validate:"required"`
NotificationFaceURL string `mapstructure:"notificationFaceURL" json:"notificationFaceURL"`
NotificationType int32 `mapstructure:"notificationType" json:"notificationType" validate:"required"`
Text string `mapstructure:"text" json:"text" validate:"required"`
Url string `mapstructure:"url" json:"url"`
MixType int32 `mapstructure:"mixType" json:"mixType"`
PictureElem PictureElem `mapstructure:"pictureElem" json:"pictureElem"`
SoundElem SoundElem `mapstructure:"soundElem" json:"soundElem"`
VideoElem VideoElem `mapstructure:"videoElem" json:"videoElem"`
FileElem FileElem `mapstructure:"fileElem" json:"fileElem"`
Ex string `mapstructure:"ex" json:"ex"`
}
type MessageRevoked struct {
RevokerID string `mapstructure:"revokerID" json:"revokerID" validate:"required"`
RevokerRole int32 `mapstructure:"revokerRole" json:"revokerRole" validate:"required"`
ClientMsgID string `mapstructure:"clientMsgID" json:"clientMsgID" validate:"required"`
RevokerNickname string `mapstructure:"revokerNickname" json:"revokerNickname"`
SessionType int32 `mapstructure:"sessionType" json:"sessionType" validate:"required"`
Seq uint32 `mapstructure:"seq" json:"seq" validate:"required"`
} }

View File

@ -121,7 +121,7 @@ func NewGinRouter(zk discoveryregistry.SvcDiscoveryRegistry) *gin.Engine {
chatGroup.POST("/del_super_group_msg", m.DelSuperGroupMsg) chatGroup.POST("/del_super_group_msg", m.DelSuperGroupMsg)
chatGroup.POST("/clear_msg", m.ClearMsg) chatGroup.POST("/clear_msg", m.ClearMsg)
chatGroup.POST("/manage_send_msg", m.ManagementSendMsg) chatGroup.POST("/send_msg", m.ManagementSendMsg)
chatGroup.POST("/batch_send_msg", m.ManagementBatchSendMsg) chatGroup.POST("/batch_send_msg", m.ManagementBatchSendMsg)
chatGroup.POST("/check_msg_is_send_success", m.CheckMsgIsSendSuccess) chatGroup.POST("/check_msg_is_send_success", m.CheckMsgIsSendSuccess)
chatGroup.POST("/get_users_online_status", m.GetUsersOnlineStatus) chatGroup.POST("/get_users_online_status", m.GetUsersOnlineStatus)

View File

@ -30,19 +30,14 @@ type AccountCheckReq struct {
CheckUserIDList []string `json:"checkUserIDList" binding:"required,lte=100"` CheckUserIDList []string `json:"checkUserIDList" binding:"required,lte=100"`
} }
type AccountCheckResp struct { type AccountCheckResp struct {
//ResultList []*pbUser.AccountCheckResp_SingleUserStatus `json:"data"`
} }
type ManagementSendMsg struct { type ManagementSendMsg struct {
OperationID string `json:"operationID" binding:"required"`
BusinessOperationID string `json:"businessOperationID"`
SendID string `json:"sendID" binding:"required"` SendID string `json:"sendID" binding:"required"`
GroupID string `json:"groupID" ` GroupID string `json:"groupID" `
SenderNickname string `json:"senderNickname" ` SenderNickname string `json:"senderNickname" `
SenderFaceURL string `json:"senderFaceURL" ` SenderFaceURL string `json:"senderFaceURL" `
SenderPlatformID int32 `json:"senderPlatformID"` SenderPlatformID int32 `json:"senderPlatformID"`
//ForceList []string `json:"forceList" `
Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"` Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"`
ContentType int32 `json:"contentType" binding:"required"` ContentType int32 `json:"contentType" binding:"required"`
SessionType int32 `json:"sessionType" binding:"required"` SessionType int32 `json:"sessionType" binding:"required"`
@ -86,39 +81,3 @@ type CheckMsgIsSendSuccessReq struct {
type CheckMsgIsSendSuccessResp struct { type CheckMsgIsSendSuccessResp struct {
Status int32 `json:"status"` Status int32 `json:"status"`
} }
type GetUsersReq struct {
OperationID string `json:"operationID" binding:"required"`
UserName string `json:"userName"`
UserID string `json:"userID"`
Content string `json:"content"`
PageNumber int32 `json:"pageNumber" binding:"required"`
ShowNumber int32 `json:"showNumber" binding:"required"`
}
type CMSUser struct {
UserID string `json:"userID"`
Nickname string `json:"nickname"`
FaceURL string `json:"faceURL"`
Gender int32 `json:"gender"`
PhoneNumber string `json:"phoneNumber"`
Birth uint32 `json:"birth"`
Email string `json:"email"`
Ex string `json:"ex"`
CreateIp string `json:"createIp"`
CreateTime uint32 `json:"createTime"`
LastLoginIp string `json:"LastLoginIp"`
LastLoginTime uint32 `json:"LastLoginTime"`
AppMangerLevel int32 `json:"appMangerLevel"`
GlobalRecvMsgOpt int32 `json:"globalRecvMsgOpt"`
IsBlock bool `json:"isBlock"`
}
type GetUsersResp struct {
Data struct {
UserList []*CMSUser `json:"userList"`
TotalNum int32 `json:"totalNum"`
CurrentPage int32 `json:"currentPage"`
ShowNumber int32 `json:"showNumber"`
} `json:"data"`
}

View File

@ -131,3 +131,90 @@ type ReactionMessageDeleteNotification struct {
ClientMsgID string `json:"clientMsgID" binding:"required"` ClientMsgID string `json:"clientMsgID" binding:"required"`
MsgFirstModifyTime int64 `json:"msgFirstModifyTime"` MsgFirstModifyTime int64 `json:"msgFirstModifyTime"`
} }
type PictureBaseInfo struct {
UUID string `mapstructure:"uuid"`
Type string `mapstructure:"type" `
Size int64 `mapstructure:"size" `
Width int32 `mapstructure:"width" `
Height int32 `mapstructure:"height"`
Url string `mapstructure:"url" `
}
type PictureElem struct {
SourcePath string `mapstructure:"sourcePath"`
SourcePicture PictureBaseInfo `mapstructure:"sourcePicture"`
BigPicture PictureBaseInfo `mapstructure:"bigPicture" `
SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"`
}
type SoundElem struct {
UUID string `mapstructure:"uuid"`
SoundPath string `mapstructure:"soundPath"`
SourceURL string `mapstructure:"sourceUrl"`
DataSize int64 `mapstructure:"dataSize"`
Duration int64 `mapstructure:"duration"`
}
type VideoElem struct {
VideoPath string `mapstructure:"videoPath"`
VideoUUID string `mapstructure:"videoUUID"`
VideoURL string `mapstructure:"videoUrl"`
VideoType string `mapstructure:"videoType"`
VideoSize int64 `mapstructure:"videoSize"`
Duration int64 `mapstructure:"duration"`
SnapshotPath string `mapstructure:"snapshotPath"`
SnapshotUUID string `mapstructure:"snapshotUUID"`
SnapshotSize int64 `mapstructure:"snapshotSize"`
SnapshotURL string `mapstructure:"snapshotUrl"`
SnapshotWidth int32 `mapstructure:"snapshotWidth"`
SnapshotHeight int32 `mapstructure:"snapshotHeight"`
}
type FileElem struct {
FilePath string `mapstructure:"filePath"`
UUID string `mapstructure:"uuid"`
SourceURL string `mapstructure:"sourceUrl"`
FileName string `mapstructure:"fileName"`
FileSize int64 `mapstructure:"fileSize"`
}
type AtElem struct {
Text string `mapstructure:"text"`
AtUserList []string `mapstructure:"atUserList"`
IsAtSelf bool `mapstructure:"isAtSelf"`
}
type LocationElem struct {
Description string `mapstructure:"description"`
Longitude float64 `mapstructure:"longitude"`
Latitude float64 `mapstructure:"latitude"`
}
type CustomElem struct {
Data string `mapstructure:"data" validate:"required"`
Description string `mapstructure:"description"`
Extension string `mapstructure:"extension"`
}
type TextElem struct {
Text string `mapstructure:"text" validate:"required"`
}
type RevokeElem struct {
RevokeMsgClientID string `mapstructure:"revokeMsgClientID" validate:"required"`
}
type OANotificationElem struct {
NotificationName string `mapstructure:"notificationName" json:"notificationName" validate:"required"`
NotificationFaceURL string `mapstructure:"notificationFaceURL" json:"notificationFaceURL"`
NotificationType int32 `mapstructure:"notificationType" json:"notificationType" validate:"required"`
Text string `mapstructure:"text" json:"text" validate:"required"`
Url string `mapstructure:"url" json:"url"`
MixType int32 `mapstructure:"mixType" json:"mixType"`
PictureElem PictureElem `mapstructure:"pictureElem" json:"pictureElem"`
SoundElem SoundElem `mapstructure:"soundElem" json:"soundElem"`
VideoElem VideoElem `mapstructure:"videoElem" json:"videoElem"`
FileElem FileElem `mapstructure:"fileElem" json:"fileElem"`
Ex string `mapstructure:"ex" json:"ex"`
}
type MessageRevoked struct {
RevokerID string `mapstructure:"revokerID" json:"revokerID" validate:"required"`
RevokerRole int32 `mapstructure:"revokerRole" json:"revokerRole" validate:"required"`
ClientMsgID string `mapstructure:"clientMsgID" json:"clientMsgID" validate:"required"`
RevokerNickname string `mapstructure:"revokerNickname" json:"revokerNickname"`
SessionType int32 `mapstructure:"sessionType" json:"sessionType" validate:"required"`
Seq uint32 `mapstructure:"seq" json:"seq" validate:"required"`
}