You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Trim room names changed through the UI
This commit is contained in:
@@ -95,10 +95,11 @@ export default class RoomProfileSettings extends React.Component {
|
|||||||
const newState = {};
|
const newState = {};
|
||||||
|
|
||||||
// TODO: What do we do about errors?
|
// TODO: What do we do about errors?
|
||||||
|
const displayName = this.state.displayName.trim();
|
||||||
if (this.state.originalDisplayName !== this.state.displayName) {
|
if (this.state.originalDisplayName !== this.state.displayName) {
|
||||||
await client.setRoomName(this.props.roomId, this.state.displayName);
|
await client.setRoomName(this.props.roomId, displayName);
|
||||||
newState.originalDisplayName = this.state.displayName;
|
newState.originalDisplayName = displayName;
|
||||||
|
newState.displayName = displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.avatarFile) {
|
if (this.state.avatarFile) {
|
||||||
|
|||||||
Reference in New Issue
Block a user