|
|
@ -207,7 +207,6 @@ func (m *MessageApi) SendMessage(c *gin.Context) {
|
|
|
|
apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap())
|
|
|
|
apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap())
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.ZInfo(c, "SendMessage", "req", req)
|
|
|
|
|
|
|
|
if !authverify.IsAppManagerUid(c) {
|
|
|
|
if !authverify.IsAppManagerUid(c) {
|
|
|
|
apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message"))
|
|
|
|
apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message"))
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -221,7 +220,6 @@ 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
|
|
|
@ -229,7 +227,6 @@ 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),
|
|
|
|