mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-04 03:12:19 +08:00
fix: online notifications do not push to herself.
This commit is contained in:
parent
75f0dbbc82
commit
21af99504f
@ -67,13 +67,14 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) {
|
|||||||
case constant.SuperGroupChatType:
|
case constant.SuperGroupChatType:
|
||||||
err = c.pusher.Push2SuperGroup(ctx, pbData.MsgData.GroupID, pbData.MsgData)
|
err = c.pusher.Push2SuperGroup(ctx, pbData.MsgData.GroupID, pbData.MsgData)
|
||||||
default:
|
default:
|
||||||
var pushUserIDs []string
|
var pushUserIDList []string
|
||||||
if pbData.MsgData.SendID != pbData.MsgData.RecvID {
|
isSenderSync := utils.GetSwitchFromOptions(pbData.MsgData.Options, constant.IsSenderSync)
|
||||||
pushUserIDs = []string{pbData.MsgData.SendID, pbData.MsgData.RecvID}
|
if !isSenderSync || pbData.MsgData.SendID == pbData.MsgData.RecvID {
|
||||||
|
pushUserIDList = append(pushUserIDList, pbData.MsgData.RecvID)
|
||||||
} else {
|
} else {
|
||||||
pushUserIDs = []string{pbData.MsgData.SendID}
|
pushUserIDList = append(pushUserIDList, pbData.MsgData.RecvID, pbData.MsgData.SendID)
|
||||||
}
|
}
|
||||||
err = c.pusher.Push2User(ctx, pushUserIDs, pbData.MsgData)
|
err = c.pusher.Push2User(ctx, pushUserIDList, pbData.MsgData)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == errNoOfflinePusher {
|
if err == errNoOfflinePusher {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user