Bug 1110155 - Added minimal Loop room name validation. r=mikedeboer

This commit is contained in:
Nicolas Perriault
2014-12-19 15:22:39 +01:00
parent b696603cf3
commit 74eb03c292
5 changed files with 35 additions and 23 deletions

View File

@@ -94,15 +94,10 @@ loop.roomViews = (function(mozL10n) {
handleFormSubmit: function(event) {
event.preventDefault();
var newRoomName = this.state.newRoomName;
if (newRoomName && this.state.roomName != newRoomName) {
this.props.dispatcher.dispatch(
new sharedActions.RenameRoom({
roomToken: this.state.roomToken,
newRoomName: newRoomName
}));
}
this.props.dispatcher.dispatch(new sharedActions.RenameRoom({
roomToken: this.state.roomToken,
newRoomName: this.state.newRoomName
}));
},
handleEmailButtonClick: function(event) {