This commit is contained in:
wangchuxiao 2023-05-16 17:28:20 +08:00
parent 6b6c6cabaa
commit 316d766511
2 changed files with 3 additions and 2 deletions

View File

@ -341,7 +341,7 @@ type Notification struct {
////////////////////////user///////////////////////
UserInfoUpdated NotificationConf `yaml:"userInfoUpdated"`
//////////////////////friend///////////////////////
FriendApplication NotificationConf `yaml:"friendApplicationAdded"`
FriendApplicationAdded NotificationConf `yaml:"friendApplicationAdded"`
FriendApplicationApproved NotificationConf `yaml:"friendApplicationApproved"`
FriendApplicationRejected NotificationConf `yaml:"friendApplicationRejected"`
FriendAdded NotificationConf `yaml:"friendAdded"`
@ -357,6 +357,7 @@ type Notification struct {
func GetOptionsByNotification(cfg NotificationConf) utils.Options {
opts := utils.NewOptions()
opts = utils.WithOptions(opts, utils.WithNotification(true))
if cfg.UnreadCount {
opts = utils.WithOptions(opts, utils.WithUnreadCount())
}

View File

@ -41,7 +41,7 @@ func newContentTypeConf() map[int32]config.NotificationConf {
// user
constant.UserInfoUpdatedNotification: config.Config.Notification.UserInfoUpdated,
// friend
constant.FriendApplicationNotification: config.Config.Notification.FriendApplication,
constant.FriendApplicationNotification: config.Config.Notification.FriendApplicationAdded,
constant.FriendApplicationApprovedNotification: config.Config.Notification.FriendApplicationApproved,
constant.FriendApplicationRejectedNotification: config.Config.Notification.FriendApplicationRejected,
constant.FriendAddedNotification: config.Config.Notification.FriendAdded,