refactor: Split remote and deactivated users into their own columns

This commit is contained in:
Ginger committed 2026-07-02 16:24:07 -04:00
1 parent d4f6c053bc
commit 69163b5391
32 files changed
+391 -278

No files matched your search

+17
View File
@@ -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()
}
}