summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-06-24 16:57:41 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2023-06-24 16:57:41 -0400
commitba24e13419bfa6efd08a0d07f049a6981ff4cd28 (patch)
treefaec03e19e22f8da36cfbc3717aa294a5052215e
parent2da021b5ea4b89d744e76c8b13180504916adc32 (diff)
downloadabaddon-portaudio-ba24e13419bfa6efd08a0d07f049a6981ff4cd28.tar.gz
abaddon-portaudio-ba24e13419bfa6efd08a0d07f049a6981ff4cd28.zip
dont notify on silent messages
-rw-r--r--src/notifications/notifications.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/notifications/notifications.cpp b/src/notifications/notifications.cpp
index 3c88c44..e95c1c0 100644
--- a/src/notifications/notifications.cpp
+++ b/src/notifications/notifications.cpp
@@ -88,6 +88,8 @@ bool CheckGuildMessage(const Message &message) {
void Notifications::CheckMessage(const Message &message) {
if (!Abaddon::Get().GetSettings().NotificationsEnabled) return;
+ // ignore if silent message
+ if (message.Flags.has_value() && ((*message.Flags & MessageFlags::SUPPRESS_NOTIFICATIONS) == MessageFlags::SUPPRESS_NOTIFICATIONS)) return;
// ignore if our status is do not disturb
if (IsDND()) return;
auto &discord = Abaddon::Get().GetDiscordClient();