From 49ae2e580c916a9a37b591cae97c5e0e13980459 Mon Sep 17 00:00:00 2001 From: John <139604278+g6619563@users.noreply.github.com> Date: Sat, 26 Aug 2023 18:28:46 +0700 Subject: [PATCH] Update msg.go fix: send text message by api doesn't work. (#929) --- internal/api/msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index ad89742af..2bbae9765 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -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") }