mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-19 05:21:22 +02:00
Trim spurious whitespace of nicknames
This commit is contained in:
parent
d5e9d5306a
commit
7d22bbc00f
@ -77,10 +77,12 @@ export default class ProfileSettings extends React.Component {
|
||||
const client = MatrixClientPeg.get();
|
||||
const newState = {};
|
||||
|
||||
const displayName = this.state.displayName.trim();
|
||||
try {
|
||||
if (this.state.originalDisplayName !== this.state.displayName) {
|
||||
await client.setDisplayName(this.state.displayName);
|
||||
newState.originalDisplayName = this.state.displayName;
|
||||
await client.setDisplayName(displayName);
|
||||
newState.originalDisplayName = displayName;
|
||||
newState.displayName = displayName;
|
||||
}
|
||||
|
||||
if (this.state.avatarFile) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user