Update msg.go (#958)

fix: send text message by api doesn't work. (#929)
pull/963/head
John 1 year ago committed by GitHub
parent 781b13c604
commit f4e4bfd639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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