From 92eb4425a1a9f3e6b00449b49276bfc0b8eda2bd Mon Sep 17 00:00:00 2001 From: ayn2op Date: Mon, 29 Dec 2025 20:26:33 -0500 Subject: [PATCH] refactor(notifications): remove redundant DM check and use MessageMentions flags only --- internal/notifications/notifications.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/notifications/notifications.go b/internal/notifications/notifications.go index 54d0675..db55853 100644 --- a/internal/notifications/notifications.go +++ b/internal/notifications/notifications.go @@ -65,8 +65,7 @@ func Notify(state *ningen.State, message *gateway.MessageCreateEvent, cfg *confi slog.Info("failed to get profile image from cache for notification", "err", err, "hash", hash) } - isChannelDM := channel.Type == discord.DirectMessage || channel.Type == discord.GroupDM - shouldChime := cfg.Notifications.Sound.Enabled && (!cfg.Notifications.Sound.OnlyOnPing || (isChannelDM || mentions.Has(ningen.MessageMentions|ningen.MessageNotifies))) + shouldChime := cfg.Notifications.Sound.Enabled && (!cfg.Notifications.Sound.OnlyOnPing || mentions.Has(ningen.MessageMentions|ningen.MessageNotifies)) if err := sendDesktopNotification(title, content, imagePath, shouldChime, cfg.Notifications.Duration); err != nil { return err }