mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-07-15 18:41:11 +08:00
添加好友时,通知更新
This commit is contained in:
parent
8c442c2e24
commit
c0076e1202
@ -704,7 +704,17 @@ func (s *friendServer) AddOnewayFriend(ctx context.Context, req *relation.ApplyT
|
|||||||
// Silently notify only A (FromUserID) to trigger an incremental friend-list sync
|
// Silently notify only A (FromUserID) to trigger an incremental friend-list sync
|
||||||
// so the remark is reflected in the conversation list.
|
// so the remark is reflected in the conversation list.
|
||||||
// B (ToUserID) receives no notification of any kind.
|
// B (ToUserID) receives no notification of any kind.
|
||||||
s.notificationSender.FriendAddedOnewayNotification(ctx, req.FromUserID, req.ToUserID)
|
//s.notificationSender.FriendAddedOnewayNotification(ctx, req.FromUserID, req.ToUserID)
|
||||||
|
|
||||||
|
// Notify only A (FromUserID) so incremental friend sync is triggered
|
||||||
|
// without notifying B (ToUserID).
|
||||||
|
tips := sdkws.FriendApplicationApprovedTips{
|
||||||
|
FromToUserID: &sdkws.FromToUserID{
|
||||||
|
FromUserID: req.FromUserID,
|
||||||
|
ToUserID: req.ToUserID,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
s.notificationSender.Notification(ctx, req.FromUserID, req.FromUserID, constant.FriendApplicationApprovedNotification, &tips)
|
||||||
return &relation.ApplyToAddFriendResp{}, nil
|
return &relation.ApplyToAddFriendResp{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user