fix: Make SuppressNotifications actually suppress notifications (#931)

* fix: use proper bitop handler

Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com>

* chore: remove debug print

Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com>

---------

Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com>
This commit is contained in:
Tom
2026-08-15 19:22:34 -07:00
committed by GitHub
parent 832f17b0dc
commit 99b3ea140f
2 changed files with 4 additions and 5 deletions

3
.gitignore vendored
View File

@@ -12,4 +12,5 @@ venv/
.DS_Store .DS_Store
livekit.yml livekit.yml
.idea .idea
.vscode/launch.json

View File

@@ -760,8 +760,7 @@ impl Message {
/// Whether this message has suppressed notifications /// Whether this message has suppressed notifications
pub fn has_suppressed_notifications(&self) -> bool { pub fn has_suppressed_notifications(&self) -> bool {
if let Some(flags) = self.flags { if let Some(flags) = self.flags {
flags & MessageFlags::SuppressNotifications as u32 MessageFlagsValue(flags).has(MessageFlags::SuppressNotifications)
== MessageFlags::SuppressNotifications as u32
} else { } else {
false false
} }
@@ -769,8 +768,7 @@ impl Message {
pub fn contains_mass_push_mention(&self) -> bool { pub fn contains_mass_push_mention(&self) -> bool {
let ping = if let Some(flags) = self.flags { let ping = if let Some(flags) = self.flags {
let flags = MessageFlagsValue(flags); MessageFlagsValue(flags).has(MessageFlags::MentionsEveryone)
flags.has(MessageFlags::MentionsEveryone)
} else { } else {
false false
}; };