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);