mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
organization
This commit is contained in:
parent
317fed304c
commit
0e03fb6393
@ -240,6 +240,7 @@ func (s *officeServer) SendMsg2Tag(_ context.Context, req *pbOffice.SendMsg2TagR
|
||||
var tagSendLogs db.TagSendLog
|
||||
|
||||
wg.Add(len(userIDList))
|
||||
var lock sync.Mutex
|
||||
for _, userID := range userIDList {
|
||||
go func(userID string) {
|
||||
defer wg.Done()
|
||||
@ -248,10 +249,12 @@ func (s *officeServer) SendMsg2Tag(_ context.Context, req *pbOffice.SendMsg2TagR
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
|
||||
return
|
||||
}
|
||||
lock.Lock()
|
||||
tagSendLogs.UserList = append(tagSendLogs.UserList, db.TagUser{
|
||||
UserID: userID,
|
||||
UserName: userName,
|
||||
})
|
||||
lock.Unlock()
|
||||
}(userID)
|
||||
}
|
||||
wg.Wait()
|
||||
|
Loading…
x
Reference in New Issue
Block a user