1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-10-05 07:18:57 +02:00

improvement: respect logout_devices param on password change

Move logout devices comment next to relevant loop

remove unnecessary log
This commit is contained in:
Devon Hudson 2021-01-16 14:48:24 -07:00
parent 9d4c7c34a0
commit ebb38cd330
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -572,8 +572,7 @@ pub async fn change_password_route(
db.users.set_password(&sender_user, &body.new_password)?;
// TODO: Read logout_devices field when it's available and respect that, currently not supported in Ruma
// See: https://github.com/ruma/ruma/issues/107
if body.logout_devices {
// Logout all devices except the current one
for id in db
.users
@ -583,6 +582,7 @@ pub async fn change_password_route(
{
db.users.remove_device(&sender_user, &id)?;
}
}
db.flush().await?;