added a new component shortcut and updated title setting logic

This commit is contained in:
Julian Lam
2018-01-04 16:04:02 -05:00
parent dee18d8442
commit 82bfd6edfd
2 changed files with 9 additions and 1 deletions

View File

@@ -410,7 +410,10 @@ define('forum/chats', [
messages.onChatMessageEdit();
socket.on('event:chats.roomRename', function (data) {
$('[component="chat/room/name"]').val($('<div/>').html(data.newName).text());
var roomEl = components.get('chat/recent/room', data.roomId);
var titleEl = roomEl.find('[component="chat/title"]');
titleEl.text(data.newName);
});
};