mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-31 03:40:16 +01:00
closes #4131
This commit is contained in:
@@ -380,8 +380,15 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
||||
app.updateUserStatus($('.chats-list [data-uid="' + data.uid + '"] [component="user/status"]'), data.status);
|
||||
});
|
||||
|
||||
socket.on('event:chats.edit', function(data) {
|
||||
Chats.onChatEdit();
|
||||
|
||||
socket.on('event:chats.roomRename', function(data) {
|
||||
$('[component="chat/room/name"]').val(data.newName);
|
||||
});
|
||||
};
|
||||
|
||||
Chats.onChatEdit = function() {
|
||||
socket.on('event:chats.edit', function(data) {
|
||||
data.messages.forEach(function(message) {
|
||||
templates.parse('partials/chat_message', {
|
||||
messages: message
|
||||
@@ -394,10 +401,6 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('event:chats.roomRename', function(data) {
|
||||
$('[component="chat/room/name"]').val(data.newName);
|
||||
});
|
||||
};
|
||||
|
||||
Chats.resizeMainWindow = function() {
|
||||
|
||||
@@ -92,6 +92,8 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
||||
socket.on('event:chats.roomRename', function(data) {
|
||||
module.getModal(data.roomId).find('[component="chat/room/name"]').val(data.newName);
|
||||
});
|
||||
|
||||
Chats.onChatEdit();
|
||||
};
|
||||
|
||||
module.loadChatsDropdown = function(chatsListEl) {
|
||||
|
||||
Reference in New Issue
Block a user