Fix displaying away message multiple times in query windows

This commit is contained in:
Pavel Djundik 2018-08-26 23:14:09 +03:00
parent e950090383
commit f8bb8f9d6f

View file

@ -34,6 +34,14 @@ module.exports = function(irc, network) {
return;
}
if (chan.userAway === away) {
return;
}
// Store current away message on channel model,
// because query windows have no users
chan.userAway = away;
user = chan.getUser(data.nick);
break;
@ -45,6 +53,8 @@ module.exports = function(irc, network) {
return;
}
user.away = away;
break;
default:
@ -59,7 +69,6 @@ module.exports = function(irc, network) {
});
chan.pushMessage(client, msg);
user.away = away;
});
}
};