|
|
|
|
@ -704,9 +704,10 @@ Template.room.onRendered -> |
|
|
|
|
RoomHistoryManager.getMoreIfIsEmpty this.data._id |
|
|
|
|
|
|
|
|
|
renameRoom = (rid, name) -> |
|
|
|
|
name = name?.toLowerCase().trim() |
|
|
|
|
console.log 'room renameRoom' if window.rocketDebug |
|
|
|
|
room = Session.get('roomData' + rid) |
|
|
|
|
if room.name == name |
|
|
|
|
if room.name is name |
|
|
|
|
Session.set('editRoomTitle', false) |
|
|
|
|
return false |
|
|
|
|
|
|
|
|
|
@ -723,6 +724,15 @@ renameRoom = (rid, name) -> |
|
|
|
|
|
|
|
|
|
toastr.success t('Room_name_changed_successfully') |
|
|
|
|
if error |
|
|
|
|
if error.error is 'name-invalid' |
|
|
|
|
toastr.error t('Invalid_room_name', name) |
|
|
|
|
return |
|
|
|
|
if error.error is 'duplicate-name' |
|
|
|
|
if room.t is 'c' |
|
|
|
|
toastr.error t('Duplicate_channel_name', name) |
|
|
|
|
else |
|
|
|
|
toastr.error t('Duplicate_private_group_name', name) |
|
|
|
|
return |
|
|
|
|
toastr.error error.reason |
|
|
|
|
|
|
|
|
|
toggleAddUser = -> |
|
|
|
|
|