refactor: Remove list_local_users function

This commit is contained in:
Ginger committed 2026-07-07 11:33:47 -04:00
1 parent 431fb7330e
commit ad4f7973cb
6 files changed
+10 -20

No files matched your search

+1 -13
View File
@@ -2,7 +2,7 @@ use std::time::{Duration, SystemTime};
use conduwuit::{
Err, Result, debug_error, debug_warn, err, error, info, trace,
utils::{self, ReadyExt, stream::TryIgnore},
utils::{self, stream::TryIgnore},
warn,
};
use database::{Deserialized, Json};
@@ -557,18 +557,6 @@ impl super::Service {
self.db.userid_password.keys().ignore_err()
}
/// Returns a list of active local users.
///
/// A user account is considered `local` if the associated password is not
/// empty.
pub fn list_local_users(&self) -> impl Stream<Item = OwnedUserId> + Send + '_ {
self.db
.userid_password
.stream()
.ignore_err()
.ready_filter_map(|(u, p): (OwnedUserId, &[u8])| (!p.is_empty()).then_some(u))
}
/// Set a user's password.
pub async fn set_password(&self, user_id: &UserId, password: HashedPassword) -> Result {
self.status(user_id).await.ensure_active()?;