fix: ignore cursor events from self

This commit is contained in:
əlemi 2023-08-21 03:53:57 +02:00
parent 5f1f43e645
commit 9f8245a9a4

View file

@ -57,6 +57,7 @@ impl ControllerWorker<CursorEvent> for CursorControllerWorker {
loop { loop {
tokio::select!{ tokio::select!{
Ok(Some(cur)) = rx.message() => { Ok(Some(cur)) = rx.message() => {
if cur.user == self.uid { continue }
self.channel.send(cur.clone()).unwrap_or_warn("could not broadcast event"); self.channel.send(cur.clone()).unwrap_or_warn("could not broadcast event");
self.changed.send(cur).unwrap_or_warn("could not update last event"); self.changed.send(cur).unwrap_or_warn("could not update last event");
}, },