|
|
@ -19,7 +19,6 @@ import (
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/go-playground/validator/v10"
|
|
|
|
"github.com/go-playground/validator/v10"
|
|
|
|
"github.com/mitchellh/mapstructure"
|
|
|
|
"github.com/mitchellh/mapstructure"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
|
|
|
|
|
|
|
|
|
|
@ -221,6 +220,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sendMsgReq.MsgData.RecvID = req.RecvID
|
|
|
|
sendMsgReq.MsgData.RecvID = req.RecvID
|
|
|
|
var status int
|
|
|
|
var status int
|
|
|
|
|
|
|
|
log.ZDebug(c, "send message start", "req", sendMsgReq)
|
|
|
|
respPb, err := m.Client.SendMsg(c, sendMsgReq)
|
|
|
|
respPb, err := m.Client.SendMsg(c, sendMsgReq)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
status = constant.MsgSendFailed
|
|
|
|
status = constant.MsgSendFailed
|
|
|
@ -228,6 +228,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) {
|
|
|
|
apiresp.GinError(c, err)
|
|
|
|
apiresp.GinError(c, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
log.ZDebug(c, "message send success", "resp", respPb)
|
|
|
|
status = constant.MsgSendSuccessed
|
|
|
|
status = constant.MsgSendSuccessed
|
|
|
|
_, err = m.Client.SetSendMsgStatus(c, &msg.SetSendMsgStatusReq{
|
|
|
|
_, err = m.Client.SetSendMsgStatus(c, &msg.SetSendMsgStatusReq{
|
|
|
|
Status: int32(status),
|
|
|
|
Status: int32(status),
|
|
|
|