Fix wrong error message in some client updates
This commit is contained in:
parent
aef1a976bf
commit
6d4c2e174f
@ -89,7 +89,11 @@ async def _update_client(client: Client, data: dict, is_login: bool = False) ->
|
||||
except MatrixConnectionError:
|
||||
return resp.bad_client_connection_details
|
||||
except ValueError as e:
|
||||
str_err = str(e)
|
||||
if str_err.startswith("MXID mismatch"):
|
||||
return resp.mxid_mismatch(str(e)[len("MXID mismatch: "):])
|
||||
elif str_err.startswith("Device ID mismatch"):
|
||||
return resp.device_id_mismatch(str(e)[len("Device ID mismatch: "):])
|
||||
with client.db_instance.edit_mode():
|
||||
await client.update_avatar_url(data.get("avatar_url", None))
|
||||
await client.update_displayname(data.get("displayname", None))
|
||||
|
Loading…
Reference in New Issue
Block a user