fix bug: init conn once

This commit is contained in:
wangchuxiao
2023-07-13 19:57:52 +08:00
parent 7cf48c89f3
commit 38a191e5d1
3 changed files with 14 additions and 23 deletions
+7 -8
View File
@@ -15,7 +15,6 @@
package api
import (
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"
"github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10"
"github.com/mitchellh/mapstructure"
@@ -291,13 +290,13 @@ func (m *MessageApi) ManagementBatchSendMsg(c *gin.Context) {
pbReq := m.newUserSendMsgReq(c, t)
var recvList []string
if params.IsSendAll {
req2 := &user.GetAllUserIDReq{}
resp2, err := m.Message.GetAllUserID(c, req2)
if err != nil {
apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error()))
return
}
recvList = resp2.UserIDs
// req2 := &user.GetAllUserIDReq{}
// resp2, err := m.Message.GetAllUserID(c, req2)
// if err != nil {
// apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error()))
// return
// }
// recvList = resp2.UserIDs
} else {
recvList = params.RecvIDList
}