diff --git a/src/room.rs b/src/room.rs index 481ddf2..b8f880e 100644 --- a/src/room.rs +++ b/src/room.rs @@ -75,6 +75,8 @@ impl Room { mode: BroadcastPresence, ) -> Result<(), Error> { let leave = matches!(mode, BroadcastPresence::Leave); + let sync = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Resync); + let update = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Update); // All participants to new participant let presence_to_new = Presence::new(if leave { @@ -105,9 +107,6 @@ impl Room { } .into()]); - let sync = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Resync); - let update = matches!(mode, BroadcastPresence::Join | BroadcastPresence::Update); - for (_, other) in self.occupants.iter() { if own_occupant.nick == other.nick { continue;