mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
mark account as deactivated before leaving rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
1 parent
2e31bcc213
commit
91519959ed
1 file changed
+3
-3
@@ -547,12 +547,12 @@ pub(crate) async fn deactivate_route(
|
|||||||
return Err(Error::BadRequest(ErrorKind::NotJson, "Not json."));
|
return Err(Error::BadRequest(ErrorKind::NotJson, "Not json."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the user leave all rooms before deactivation
|
|
||||||
super::leave_all_rooms(sender_user).await;
|
|
||||||
|
|
||||||
// Remove devices and mark account as deactivated
|
// Remove devices and mark account as deactivated
|
||||||
services().users.deactivate_account(sender_user)?;
|
services().users.deactivate_account(sender_user)?;
|
||||||
|
|
||||||
|
// Make the user leave all rooms before deactivation
|
||||||
|
super::leave_all_rooms(sender_user).await;
|
||||||
|
|
||||||
info!("User {sender_user} deactivated their account.");
|
info!("User {sender_user} deactivated their account.");
|
||||||
services()
|
services()
|
||||||
.admin
|
.admin
|
||||||
|
|||||||
Reference in new issue
Block a user