Node.js based forum software built for the modern web
minimizing the composer should unregister it
Julian Lama9b78d2600dd
diff --git a/public/src/modules/composer.js b/public/src/modules/composer.jsindex 07bbee5c88..c9457aa38a 100644--- a/public/src/modules/composer.js+++ b/public/src/modules/composer.js@@ -390,9 +390,8 @@ define(['taskbar'], function(taskbar) {composer.createNewComposer(post_uuid);}- var tid = templates.get('topic_id'),- postData = composer.posts[post_uuid];- if (tid) {+ var postData = composer.posts[post_uuid];+ if (postData.tid) {// Replying to a topicsocket.emit('modules.composer.register', {uuid: post_uuid,@@ -843,6 +842,8 @@ define(['taskbar'], function(taskbar) {postContainer.css('visibility', 'hidden');composer.active = undefined;taskbar.minimize('composer', post_uuid);++ socket.emit('modules.composer.unregister', post_uuid);};return {diff --git a/src/socket.io/modules.js b/src/socket.io/modules.jsindex ac60ef9884..8566e65786 100644--- a/src/socket.io/modules.js+++ b/src/socket.io/modules.js@@ -78,6 +78,7 @@ SocketModules.composer.renderHelp = function(socket, data, callback) {SocketModules.composer.register = function(socket, data) {var now = Date.now();+server.in('topic_' + data.tid).emit('event:topic.replyStart', data.uid);data.socket = socket;