mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 05:06:53 +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
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user