Handle errors on password change

This commit is contained in:
Matthew Wild
2024-01-08 22:50:36 +00:00
parent 95a8ac1387
commit ec94c64dbc

View File

@@ -908,7 +908,7 @@ class ProsodyClient:
self.session_address, self.session_address,
current_password, current_password,
) )
await self._xml_iq_call( password_changed = await self._xml_iq_call(
session, session,
xmpputil.make_password_change_request( xmpputil.make_password_change_request(
self.session_address, self.session_address,
@@ -919,7 +919,7 @@ class ProsodyClient:
}, },
sensitive=True, sensitive=True,
) )
# TODO: error handling xmpputil.extract_iq_reply(password_changed)
# TODO: obtain a new token using the new password to allow the # TODO: obtain a new token using the new password to allow the
# server to expire/revoke all tokens on password change. # server to expire/revoke all tokens on password change.
self._store_token_in_session(token_info) self._store_token_in_session(token_info)