|
|
@ -170,12 +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["text"].(string)
|
|
|
|
data = apistruct.TextElem{}
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, errs.ErrArgs.WithDetail("text is not string")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
data = apistruct.TextContentElem{Content: text}
|
|
|
|
|
|
|
|
log.ZDebug(c, "getSendMsgReq", "data", data)
|
|
|
|
|
|
|
|
case constant.Picture:
|
|
|
|
case constant.Picture:
|
|
|
|
data = apistruct.PictureElem{}
|
|
|
|
data = apistruct.PictureElem{}
|
|
|
|
case constant.Voice:
|
|
|
|
case constant.Voice:
|
|
|
|