mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 10:52:33 +08:00
update notification
This commit is contained in:
parent
e41268de0f
commit
d77b772fb2
@ -53,10 +53,6 @@ type friendServer struct {
|
|||||||
RegisterCenter registry.SvcDiscoveryRegistry
|
RegisterCenter registry.SvcDiscoveryRegistry
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *friendServer) UpdateFriends(ctx context.Context, req *pbfriend.UpdateFriendsReq) (*pbfriend.UpdateFriendsResp, error) {
|
|
||||||
return nil, errs.ErrInternalServer.Wrap("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
||||||
// Initialize MongoDB
|
// Initialize MongoDB
|
||||||
mongo, err := unrelation.NewMongo()
|
mongo, err := unrelation.NewMongo()
|
||||||
@ -476,6 +472,6 @@ func (s *friendServer) UpdateFriends(
|
|||||||
|
|
||||||
resp := &pbfriend.UpdateFriendsResp{}
|
resp := &pbfriend.UpdateFriendsResp{}
|
||||||
|
|
||||||
s.notificationSender.FriendsInfoUpdateNotification(ctx, req.OwnerUserID)
|
s.notificationSender.FriendsInfoUpdateNotification(ctx, req.OwnerUserID, req.FriendUserIDs)
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,10 +57,6 @@ type userServer struct {
|
|||||||
RegisterCenter registry.SvcDiscoveryRegistry
|
RegisterCenter registry.SvcDiscoveryRegistry
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *userServer) UpdateUserInfoEx(ctx context.Context, req *pbuser.UpdateUserInfoExReq) (*pbuser.UpdateUserInfoExResp, error) {
|
|
||||||
return nil, errs.ErrInternalServer.Wrap("not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
||||||
rdb, err := cache.NewRedis()
|
rdb, err := cache.NewRedis()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -365,7 +365,6 @@ type notification struct {
|
|||||||
BlackAdded NotificationConf `yaml:"blackAdded"`
|
BlackAdded NotificationConf `yaml:"blackAdded"`
|
||||||
BlackDeleted NotificationConf `yaml:"blackDeleted"`
|
BlackDeleted NotificationConf `yaml:"blackDeleted"`
|
||||||
FriendInfoUpdated NotificationConf `yaml:"friendInfoUpdated"`
|
FriendInfoUpdated NotificationConf `yaml:"friendInfoUpdated"`
|
||||||
FriendsInfoUpdate NotificationConf `yaml:"friendsInfoUpdate"`
|
|
||||||
//////////////////////conversation///////////////////////
|
//////////////////////conversation///////////////////////
|
||||||
ConversationChanged NotificationConf `yaml:"conversationChanged"`
|
ConversationChanged NotificationConf `yaml:"conversationChanged"`
|
||||||
ConversationSetPrivate NotificationConf `yaml:"conversationSetPrivate"`
|
ConversationSetPrivate NotificationConf `yaml:"conversationSetPrivate"`
|
||||||
|
|||||||
@ -68,7 +68,7 @@ func newContentTypeConf() map[int32]config.NotificationConf {
|
|||||||
constant.BlackAddedNotification: config.Config.Notification.BlackAdded,
|
constant.BlackAddedNotification: config.Config.Notification.BlackAdded,
|
||||||
constant.BlackDeletedNotification: config.Config.Notification.BlackDeleted,
|
constant.BlackDeletedNotification: config.Config.Notification.BlackDeleted,
|
||||||
constant.FriendInfoUpdatedNotification: config.Config.Notification.FriendInfoUpdated,
|
constant.FriendInfoUpdatedNotification: config.Config.Notification.FriendInfoUpdated,
|
||||||
constant.FriendsInfoUpdateNotification: config.Config.Notification.FriendsInfoUpdate,
|
constant.FriendsInfoUpdateNotification: config.Config.Notification.FriendInfoUpdated, //use the same FriendInfoUpdated
|
||||||
// conversation
|
// conversation
|
||||||
constant.ConversationChangeNotification: config.Config.Notification.ConversationChanged,
|
constant.ConversationChangeNotification: config.Config.Notification.ConversationChanged,
|
||||||
constant.ConversationUnreadNotification: config.Config.Notification.ConversationChanged,
|
constant.ConversationUnreadNotification: config.Config.Notification.ConversationChanged,
|
||||||
|
|||||||
@ -196,9 +196,10 @@ func (f *FriendNotificationSender) FriendRemarkSetNotification(ctx context.Conte
|
|||||||
tips.FromToUserID.ToUserID = toUserID
|
tips.FromToUserID.ToUserID = toUserID
|
||||||
return f.Notification(ctx, fromUserID, toUserID, constant.FriendRemarkSetNotification, &tips)
|
return f.Notification(ctx, fromUserID, toUserID, constant.FriendRemarkSetNotification, &tips)
|
||||||
}
|
}
|
||||||
func (f *FriendNotificationSender) FriendsInfoUpdateNotification(ctx context.Context, toUserID string) error {
|
func (f *FriendNotificationSender) FriendsInfoUpdateNotification(ctx context.Context, toUserID string, friendIDs []string) error {
|
||||||
tips := sdkws.FriendsInfoUpdateTips{}
|
tips := sdkws.FriendsInfoUpdateTips{}
|
||||||
tips.FromToUserID.ToUserID = toUserID
|
tips.FromToUserID.ToUserID = toUserID
|
||||||
|
tips.FriendIDs = friendIDs
|
||||||
return f.Notification(ctx, toUserID, toUserID, constant.FriendsInfoUpdateNotification, &tips)
|
return f.Notification(ctx, toUserID, toUserID, constant.FriendsInfoUpdateNotification, &tips)
|
||||||
}
|
}
|
||||||
func (f *FriendNotificationSender) BlackAddedNotification(ctx context.Context, req *pbfriend.AddBlackReq) error {
|
func (f *FriendNotificationSender) BlackAddedNotification(ctx context.Context, req *pbfriend.AddBlackReq) error {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user