mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-10 12:05:58 +08:00
fix: add notifications for some notifications. (#1609)
This commit is contained in:
@@ -256,6 +256,7 @@ func (s *NotificationSender) NotificationWithSesstionType(ctx context.Context, s
|
||||
optionsConfig.ReliabilityLevel = constant.UnreliableNotification
|
||||
}
|
||||
options := config.GetOptionsByNotification(optionsConfig)
|
||||
s.SetOptionsByContentType(ctx, options, contentType)
|
||||
msg.Options = options
|
||||
offlineInfo.Title = title
|
||||
offlineInfo.Desc = desc
|
||||
@@ -274,3 +275,11 @@ func (s *NotificationSender) NotificationWithSesstionType(ctx context.Context, s
|
||||
func (s *NotificationSender) Notification(ctx context.Context, sendID, recvID string, contentType int32, m proto.Message, opts ...NotificationOptions) error {
|
||||
return s.NotificationWithSesstionType(ctx, sendID, recvID, contentType, s.sessionTypeConf[contentType], m, opts...)
|
||||
}
|
||||
|
||||
func (s *NotificationSender) SetOptionsByContentType(_ context.Context, options map[string]bool, contentType int32) {
|
||||
switch contentType {
|
||||
case constant.UserStatusChangeNotification:
|
||||
options[constant.IsSenderSync] = false
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user