diff --git a/src/mami.js/sockchat_old.js b/src/mami.js/sockchat_old.js index 8e3e197..092a3bb 100644 --- a/src/mami.js/sockchat_old.js +++ b/src/mami.js/sockchat_old.js @@ -102,10 +102,6 @@ Umi.Protocol.SockChat.Protocol = function() { isRestarting = false; - // see if these are neccesary - eventTarget.dispatch('user:clear'); - eventTarget.dispatch('chan:clear'); - eventTarget.dispatch('conn:ready', { wasConnected: wasConnected }); }; @@ -417,6 +413,7 @@ Umi.Protocol.SockChat.Protocol = function() { // existing users handlers['7']['0'] = (count, ...args) => { count = parseInt(count); + eventTarget.dispatch('user:clear'); for(let i = 0; i < count; ++i) { const offset = 5 * i; @@ -477,6 +474,7 @@ Umi.Protocol.SockChat.Protocol = function() { // existing channels handlers['7']['2'] = (count, ...args) => { count = parseInt(count); + eventTarget.dispatch('chan:clear'); for(let i = 0; i < count; ++i) { const offset = 3 * i;