diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index a62d0a299b..7a103d56aa 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -40,10 +40,9 @@ define(['taskbar'], function(taskbar) { }); addSendHandler(chatModal, touid); - - taskbar.push('chat', uuid, {title:'chat with '+username}); } + taskbar.push('chat', chatModal.attr('UUID'), {title:'chat with '+username}); return chatModal; } diff --git a/public/src/modules/taskbar.js b/public/src/modules/taskbar.js index 28ae40b3fa..dfe6dfc91a 100644 --- a/public/src/modules/taskbar.js +++ b/public/src/modules/taskbar.js @@ -51,6 +51,10 @@ define(function() { taskbar.update(); }, push: function(module, uuid, options) { + var element = $(taskbar.tasklist).find('li[data-uuid="'+uuid+'"]'); + if(element.length) + return; + var btnEl = document.createElement('li'); btnEl.innerHTML = '' +