mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-25 20:52:11 +08:00
fix: content in sendSimpleMessage
This commit is contained in:
parent
1d7660bedb
commit
123929bc19
@ -490,6 +490,11 @@ func (m *MessageApi) SendSimpleMessage(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
content, err := jsonutil.JsonMarshal(apistruct.MarkdownTextElem{Content: req.Content})
|
||||||
|
if err != nil {
|
||||||
|
apiresp.GinError(c, errs.Wrap(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
msgData := &sdkws.MsgData{
|
msgData := &sdkws.MsgData{
|
||||||
SendID: sendID,
|
SendID: sendID,
|
||||||
RecvID: recvID,
|
RecvID: recvID,
|
||||||
@ -498,8 +503,8 @@ func (m *MessageApi) SendSimpleMessage(c *gin.Context) {
|
|||||||
SenderPlatformID: constant.AdminPlatformID,
|
SenderPlatformID: constant.AdminPlatformID,
|
||||||
SessionType: sessionType,
|
SessionType: sessionType,
|
||||||
MsgFrom: constant.UserMsgType,
|
MsgFrom: constant.UserMsgType,
|
||||||
ContentType: constant.Text,
|
ContentType: constant.MarkdownText,
|
||||||
Content: []byte(req.Content),
|
Content: content,
|
||||||
OfflinePushInfo: req.OfflinePushInfo,
|
OfflinePushInfo: req.OfflinePushInfo,
|
||||||
Ex: req.Ex,
|
Ex: req.Ex,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user