mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
refactor: Split remote and deactivated users into their own columns
This commit is contained in:
32 files changed
+391
-278
No files matched your search
@@ -0,0 +1,17 @@
|
||||
use conduwuit::utils::stream::TryIgnore;
|
||||
use futures::Stream;
|
||||
use ruma::{OwnedUserId, UserId};
|
||||
|
||||
impl super::Service {
|
||||
/// Record the existence of a remote user.
|
||||
pub fn record_remote_user(&self, user_id: &UserId) {
|
||||
assert!(self.services.globals.user_is_local(user_id), "user is not remote");
|
||||
|
||||
self.db.remoteuserid_remoteuser.insert(user_id, "");
|
||||
}
|
||||
|
||||
/// Returns a stream over all remote users this server has ever seen.
|
||||
pub fn stream_remote_users(&self) -> impl Stream<Item = OwnedUserId> + Send {
|
||||
self.db.remoteuserid_remoteuser.keys().ignore_err()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user