mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-08-30 22:04:23 +00:00
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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ venv/
|
||||
|
||||
livekit.yml
|
||||
.idea
|
||||
.vscode/launch.json
|
||||
@@ -760,8 +760,7 @@ impl Message {
|
||||
/// Whether this message has suppressed notifications
|
||||
pub fn has_suppressed_notifications(&self) -> bool {
|
||||
if let Some(flags) = self.flags {
|
||||
flags & MessageFlags::SuppressNotifications as u32
|
||||
== MessageFlags::SuppressNotifications as u32
|
||||
MessageFlagsValue(flags).has(MessageFlags::SuppressNotifications)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
@@ -769,8 +768,7 @@ impl Message {
|
||||
|
||||
pub fn contains_mass_push_mention(&self) -> bool {
|
||||
let ping = if let Some(flags) = self.flags {
|
||||
let flags = MessageFlagsValue(flags);
|
||||
flags.has(MessageFlags::MentionsEveryone)
|
||||
MessageFlagsValue(flags).has(MessageFlags::MentionsEveryone)
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user