Update msg.go (#958)

fix: send text message by api doesn't work. (#929)
This commit is contained in:
John
2023-08-28 10:27:49 +07:00
committed by GitHub
parent 781b13c604
commit f4e4bfd639
+1 -1
View File
@@ -170,7 +170,7 @@ func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendM
log.ZDebug(c, "getSendMsgReq", "req", req.Content)
switch req.ContentType {
case constant.Text:
text, ok := req.Content["content"].(string)
text, ok := req.Content["text"].(string)
if !ok {
return nil, errs.ErrArgs.WithDetail("text is not string")
}