mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
update user command notification
This commit is contained in:
parent
debd43303e
commit
623f66687e
@ -384,7 +384,11 @@ func (s *userServer) ProcessUserCommandAdd(ctx context.Context, req *pbuser.Proc
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tips := &sdkws.UserCommandAddTips{
|
||||
FromUserID: req.UserID,
|
||||
ToUserID: req.UserID,
|
||||
}
|
||||
s.userNotificationSender.UserCommandAddNotification(ctx, tips)
|
||||
return &pbuser.ProcessUserCommandAddResp{}, nil
|
||||
}
|
||||
|
||||
@ -395,7 +399,11 @@ func (s *userServer) ProcessUserCommandDelete(ctx context.Context, req *pbuser.P
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tips := &sdkws.UserCommandDeleteTips{
|
||||
FromUserID: req.UserID,
|
||||
ToUserID: req.UserID,
|
||||
}
|
||||
s.userNotificationSender.UserCommandDeleteNotification(ctx, tips)
|
||||
return &pbuser.ProcessUserCommandDeleteResp{}, nil
|
||||
}
|
||||
|
||||
@ -406,7 +414,11 @@ func (s *userServer) ProcessUserCommandUpdate(ctx context.Context, req *pbuser.P
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tips := &sdkws.UserCommandUpdateTips{
|
||||
FromUserID: req.UserID,
|
||||
ToUserID: req.UserID,
|
||||
}
|
||||
s.userNotificationSender.UserCommandUpdateNotification(ctx, tips)
|
||||
return &pbuser.ProcessUserCommandUpdateResp{}, nil
|
||||
}
|
||||
|
||||
|
||||
@ -103,3 +103,21 @@ func (u *UserNotificationSender) UserStatusChangeNotification(
|
||||
) error {
|
||||
return u.Notification(ctx, tips.FromUserID, tips.ToUserID, constant.UserStatusChangeNotification, tips)
|
||||
}
|
||||
func (u *UserNotificationSender) UserCommandUpdateNotification(
|
||||
ctx context.Context,
|
||||
tips *sdkws.UserCommandUpdateTips,
|
||||
) error {
|
||||
return u.Notification(ctx, tips.FromUserID, tips.ToUserID, constant.UserStatusChangeNotification, tips)
|
||||
}
|
||||
func (u *UserNotificationSender) UserCommandAddNotification(
|
||||
ctx context.Context,
|
||||
tips *sdkws.UserCommandAddTips,
|
||||
) error {
|
||||
return u.Notification(ctx, tips.FromUserID, tips.ToUserID, constant.UserStatusChangeNotification, tips)
|
||||
}
|
||||
func (u *UserNotificationSender) UserCommandDeleteNotification(
|
||||
ctx context.Context,
|
||||
tips *sdkws.UserCommandDeleteTips,
|
||||
) error {
|
||||
return u.Notification(ctx, tips.FromUserID, tips.ToUserID, constant.UserStatusChangeNotification, tips)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user