fix: send text message by api doesn't work. (#954)

pull/957/head
acheng 2 years ago
parent 31ae8271e7
commit 85a5909cc7

@ -170,7 +170,7 @@ func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendM
log.ZDebug(c, "getSendMsgReq", "req", req.Content) log.ZDebug(c, "getSendMsgReq", "req", req.Content)
switch req.ContentType { switch req.ContentType {
case constant.Text: case constant.Text:
text, ok := req.Content["content"].(string) text, ok := req.Content["text"].(string)
if !ok { if !ok {
return nil, errs.ErrArgs.WithDetail("text is not string") return nil, errs.ErrArgs.WithDetail("text is not string")
} }

Loading…
Cancel
Save