fix: Don't send webxdc notification for notify: "*" when chat is muted (#7658)

- webxdc notify specifically to Bob: notifies Bob even when chat is
muted
- webxdc notify to everyone ("*"): notifies Bob if he does not have the
chat muted

This aligns with how we handle notifications with quote replies.

---------

Co-authored-by: link2xt <link2xt@testrun.org>
This commit is contained in:
Casper Zandbergen
2025-12-30 23:14:35 +01:00
committed by GitHub
parent 25750de4e1
commit 516f0a1a98
3 changed files with 84 additions and 7 deletions

View File

@@ -1434,13 +1434,14 @@ impl EventTracker {
event_matcher: F,
) -> Option<EventType> {
ctx.emit_event(EventType::Test);
let mut found_event = None;
loop {
let event = self.recv().await.unwrap();
if event_matcher(&event.typ) {
return Some(event.typ);
}
if let EventType::Test = event.typ {
return None;
return found_event;
}
if event_matcher(&event.typ) {
found_event = Some(event.typ);
}
}
}