mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-15 18:01:37 +03:00
Trim room names changed through the UI
This commit is contained in:
parent
7d22bbc00f
commit
fcbaea640d
1 changed files with 4 additions and 3 deletions
|
@ -95,10 +95,11 @@ export default class RoomProfileSettings extends React.Component {
|
|||
const newState = {};
|
||||
|
||||
// TODO: What do we do about errors?
|
||||
|
||||
const displayName = this.state.displayName.trim();
|
||||
if (this.state.originalDisplayName !== this.state.displayName) {
|
||||
await client.setRoomName(this.props.roomId, this.state.displayName);
|
||||
newState.originalDisplayName = this.state.displayName;
|
||||
await client.setRoomName(this.props.roomId, displayName);
|
||||
newState.originalDisplayName = displayName;
|
||||
newState.displayName = displayName;
|
||||
}
|
||||
|
||||
if (this.state.avatarFile) {
|
||||
|
|
Loading…
Reference in a new issue