feat: admin room

This commit is contained in:
Timo Kösters
2020-10-05 22:19:22 +02:00
parent 0d6159c2da
commit bcd1fe1856
12 changed files with 864 additions and 574 deletions

View File

@@ -57,6 +57,11 @@ impl Users {
Ok(())
}
/// Returns the number of users registered on this server.
pub fn count(&self) -> usize {
self.userid_password.iter().count()
}
/// Find out which user an access token belongs to.
pub fn find_from_token(&self, token: &str) -> Result<Option<(UserId, String)>> {
self.token_userdeviceid