mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode
This commit is contained in:
commit
416bf4921c
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/fcm"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/getui"
|
||||
@ -153,17 +152,18 @@ func (p *Pusher) Push2SuperGroup(ctx context.Context, groupID string, msg *sdkws
|
||||
kickedUsers := utils.Slice(tips.KickedUserList, func(e *sdkws.GroupMemberFullInfo) string { return e.UserID })
|
||||
pushToUserIDs = append(pushToUserIDs, kickedUsers...)
|
||||
case constant.GroupDismissedNotification:
|
||||
var tips sdkws.GroupDismissedTips
|
||||
if p.UnmarshalNotificationElem(msg.Content, &tips) != nil {
|
||||
return err
|
||||
}
|
||||
log.ZInfo(ctx, "GroupDismissedNotification userIDs", "groupID", groupID, "userIDs", pushToUserIDs)
|
||||
if len(config.Config.Manager.AppManagerUid) > 0 {
|
||||
ctx = mcontext.WithOpUserIDContext(ctx, config.Config.Manager.AppManagerUid[0])
|
||||
}
|
||||
if err := p.DismissGroup(ctx, groupID); err != nil {
|
||||
log.ZError(ctx, "DismissGroup Notification clear members", err, "groupID", groupID)
|
||||
return err
|
||||
if utils.IsNotification(utils.GetConversationIDByMsg(msg)) { // 消息先到,通知后到
|
||||
var tips sdkws.GroupDismissedTips
|
||||
if p.UnmarshalNotificationElem(msg.Content, &tips) != nil {
|
||||
return err
|
||||
}
|
||||
log.ZInfo(ctx, "GroupDismissedNotificationInfo****", "groupID", groupID, "num", len(pushToUserIDs), "list", pushToUserIDs)
|
||||
if len(config.Config.Manager.AppManagerUid) > 0 {
|
||||
ctx = mcontext.WithOpUserIDContext(ctx, config.Config.Manager.AppManagerUid[0])
|
||||
}
|
||||
if err := p.DismissGroup(ctx, groupID); err != nil {
|
||||
log.ZError(ctx, "DismissGroup Notification clear members", err, "groupID", groupID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ func (c *MsgClient) Notification(ctx context.Context, sendID, recvID string, con
|
||||
if err == nil {
|
||||
log.ZDebug(ctx, "MsgClient Notification SendMsg success", "req", &req)
|
||||
} else {
|
||||
log.ZError(ctx, "MsgClient Notification SendMsg failed %s\n", err, "req", &req)
|
||||
log.ZError(ctx, "MsgClient Notification SendMsg failed", err, "req", &req)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user