From c91b96c13329b06580a6507079e2aab402fa6838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 11 Jun 2018 11:47:20 -0400 Subject: [PATCH] use data.roomName --- public/src/modules/chat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index c803043da0..558229c4a6 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -87,6 +87,7 @@ define('chat', [ if (err) { return app.alertError(err.message); } + roomData.users = roomData.users.filter(function (user) { return user && parseInt(user.uid, 10) !== parseInt(app.user.uid, 10); }); @@ -236,7 +237,7 @@ define('chat', [ }); Chats.addActionHandlers(chatModal.find('[component="chat/messages"]'), data.roomId); - Chats.addRenameHandler(chatModal.attr('data-roomid'), chatModal.find('[data-action="rename"]'), chatModal.attr('data-name')); + Chats.addRenameHandler(chatModal.attr('data-roomid'), chatModal.find('[data-action="rename"]'), data.roomName); Chats.addLeaveHandler(chatModal.attr('data-roomid'), chatModal.find('[data-action="leave"]')); Chats.addSendHandlers(chatModal.attr('data-roomid'), chatModal.find('.chat-input'), chatModal.find('[data-action="send"]')); Chats.addMemberHandler(chatModal.attr('data-roomid'), chatModal.find('[data-action="members"]'));