Show users if room knows them

Also selects the current room in the rooms list
This commit is contained in:
Joscha 2022-02-27 00:16:36 +01:00
parent ccf6a59f39
commit f34bf63be4
7 changed files with 104 additions and 27 deletions

View file

@ -36,9 +36,9 @@ struct Connected {
}
/// State for when a client has fully joined a room.
struct Present {
session: Session,
others: HashMap<SessionId, Session>,
pub struct Present {
pub session: Session,
pub others: HashMap<SessionId, Session>,
}
enum Status {
@ -95,6 +95,10 @@ impl Room {
room
}
pub fn present(&self) -> Option<&Present> {
self.present.as_ref()
}
async fn bg_task(room: Arc<Mutex<Room>>, config: &'static Config) {
let mut room_verified = false;
loop {