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

+1 -1
View File
@@ -248,7 +248,7 @@ impl Service {
) -> impl Stream<Item = OwnedUserId> + Send + 'a {
self.local_users_in_room(room_id)
.filter_map(async |user_id| {
if self.services.users.is_active(&user_id).await {
if self.services.users.status(&user_id).await.is_active() {
Some(user_id)
} else {
None
+2 -9
View File
@@ -30,15 +30,8 @@ impl super::Service {
) -> Result {
let membership = pdu.get_content::<RoomMemberEventContent>()?;
// Keep track what remote users exist by adding them as "deactivated" users
//
// TODO: use futures to update remote profiles without blocking the membership
// update
#[allow(clippy::collapsible_if)]
if !self.services.globals.user_is_local(user_id)
&& !self.services.users.exists(user_id).await
{
self.services.users.create(user_id, None)?;
if !self.services.globals.user_is_local(user_id) {
self.services.users.record_remote_user(user_id);
}
match &membership.membership {