mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Log when saving profile
We had a bug report with this failing but there's nothing useful because nothing is logged.
This commit is contained in:
parent
6a916757df
commit
28a64cd56c
1 changed files with 4 additions and 0 deletions
|
@ -84,6 +84,9 @@ export default class ProfileSettings extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.avatarFile) {
|
if (this.state.avatarFile) {
|
||||||
|
console.log(
|
||||||
|
`Uploading new avatar, ${this.state.avatarFile.name} of type ${this.state.avatarFile.type},` +
|
||||||
|
` (${this.state.avatarFile.size}) bytes`);
|
||||||
const uri = await client.uploadContent(this.state.avatarFile);
|
const uri = await client.uploadContent(this.state.avatarFile);
|
||||||
await client.setAvatarUrl(uri);
|
await client.setAvatarUrl(uri);
|
||||||
newState.avatarUrl = client.mxcUrlToHttp(uri, 96, 96, 'crop', false);
|
newState.avatarUrl = client.mxcUrlToHttp(uri, 96, 96, 'crop', false);
|
||||||
|
@ -93,6 +96,7 @@ export default class ProfileSettings extends React.Component {
|
||||||
await client.setAvatarUrl(""); // use empty string as Synapse 500s on undefined
|
await client.setAvatarUrl(""); // use empty string as Synapse 500s on undefined
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.log("Failed to save profile", err);
|
||||||
Modal.createTrackedDialog('Failed to save profile', '', ErrorDialog, {
|
Modal.createTrackedDialog('Failed to save profile', '', ErrorDialog, {
|
||||||
title: _t("Failed to save your profile"),
|
title: _t("Failed to save your profile"),
|
||||||
description: ((err && err.message) ? err.message : _t("The operation could not be completed")),
|
description: ((err && err.message) ? err.message : _t("The operation could not be completed")),
|
||||||
|
|
Loading…
Reference in a new issue