mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-07-12 16:13:29 +08:00
添加好友时,通知更新
This commit is contained in:
parent
c0076e1202
commit
5118bcc1c0
@ -205,6 +205,7 @@ func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, co
|
|||||||
friendRouterGroup.POST("/get_full_friend_user_ids", f.GetFullFriendUserIDs)
|
friendRouterGroup.POST("/get_full_friend_user_ids", f.GetFullFriendUserIDs)
|
||||||
friendRouterGroup.POST("/get_self_unhandled_apply_count", f.GetSelfUnhandledApplyCount)
|
friendRouterGroup.POST("/get_self_unhandled_apply_count", f.GetSelfUnhandledApplyCount)
|
||||||
friendRouterGroup.POST("/get_pinned_friend_ids", f.GetPinnedFriendIDs)
|
friendRouterGroup.POST("/get_pinned_friend_ids", f.GetPinnedFriendIDs)
|
||||||
|
friendRouterGroup.POST("/add_oneway_friend", f.AddOnewayFriend)
|
||||||
}
|
}
|
||||||
|
|
||||||
g := NewGroupApi(group.NewGroupClient(groupConn))
|
g := NewGroupApi(group.NewGroupClient(groupConn))
|
||||||
|
|||||||
@ -704,17 +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
|
// Notify only A (FromUserID) so incremental friend sync is triggered
|
||||||
// without notifying B (ToUserID).
|
// without notifying B (ToUserID).
|
||||||
tips := sdkws.FriendApplicationApprovedTips{
|
//tips := sdkws.FriendApplicationApprovedTips{
|
||||||
FromToUserID: &sdkws.FromToUserID{
|
// FromToUserID: &sdkws.FromToUserID{
|
||||||
FromUserID: req.FromUserID,
|
// FromUserID: req.FromUserID,
|
||||||
ToUserID: req.ToUserID,
|
// ToUserID: req.ToUserID,
|
||||||
},
|
// },
|
||||||
}
|
//}
|
||||||
s.notificationSender.Notification(ctx, req.FromUserID, req.FromUserID, constant.FriendApplicationApprovedNotification, &tips)
|
//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