mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-08-30 23:07:27 +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:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,4 +12,5 @@ venv/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
livekit.yml
|
livekit.yml
|
||||||
.idea
|
.idea
|
||||||
|
.vscode/launch.json
|
||||||
@@ -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
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user