Skip to content
Snippets Groups Projects
Commit 91519959 authored by 🥺's avatar 🥺 :transgender_flag:
Browse files

mark account as deactivated before leaving rooms

parent 2e31bcc2
No related branches found
No related tags found
1 merge request!457Remove pfps/display names on deactivation, make "View History" on state events work in Element
......@@ -547,12 +547,12 @@ pub(crate) async fn deactivate_route(
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
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.");
services()
.admin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment