From 18bf1b946b79be460d99df3ea79258b4d02fd244 Mon Sep 17 00:00:00 2001 From: Xaekai Date: Thu, 29 Jun 2017 19:04:49 -0700 Subject: [PATCH] Minor fixes to afk stuff. --- src/channel/channel.js | 2 +- www/js/callbacks.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/channel/channel.js b/src/channel/channel.js index 6a9b400d..a116dbb6 100644 --- a/src/channel/channel.js +++ b/src/channel/channel.js @@ -419,7 +419,7 @@ Channel.prototype.acceptUser = function (user) { } user.on('afk', function(afk){ - self.sendUserMeta(self.users, user, -1); + self.sendUserMeta(self.users, user); // TODO: Drop legacy setAFK frame after a few months self.broadcastAll("setAFK", { name: user.getName(), afk: afk }); }) diff --git a/www/js/callbacks.js b/www/js/callbacks.js index 239de08d..5f679797 100644 --- a/www/js/callbacks.js +++ b/www/js/callbacks.js @@ -520,7 +520,7 @@ Callbacks = { * after script authors have had ample time to update */ socket.listeners('setAFK').forEach(function(listener){ - listener(data.meta.afk); + listener({ name: data.name, afk: data.meta.afk }); }); formatUserlistItem(user, data);