From c268d91b4e85df9c25869a852e3de9390638abcb Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 21 Nov 2017 13:54:12 +0200 Subject: [PATCH] Access new nick attribute in user object This was broken in #1698 --- client/js/socket-events/msg.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/js/socket-events/msg.js b/client/js/socket-events/msg.js index d8f50958..889d491f 100644 --- a/client/js/socket-events/msg.js +++ b/client/js/socket-events/msg.js @@ -82,10 +82,10 @@ function processReceivedMessage(data) { if ((data.msg.type === "message" || data.msg.type === "action" || data.msg.type === "notice") && channel.hasClass("channel")) { const nicks = channel.find(".users").data("nicks"); if (nicks) { - const find = nicks.indexOf(data.msg.from); + const find = nicks.indexOf(data.msg.from.nick); if (find !== -1) { nicks.splice(find, 1); - nicks.unshift(data.msg.from); + nicks.unshift(data.msg.from.nick); } } } @@ -118,9 +118,9 @@ function notifyMessage(targetId, channel, msg) { if (msg.type === "invite") { title = "New channel invite:"; - body = msg.from + " invited you to " + msg.channel; + body = msg.from.nick + " invited you to " + msg.channel; } else { - title = msg.from; + title = msg.from.nick; if (!button.hasClass("query")) { title += " (" + button.data("title").trim() + ")"; }