mirror of
https://github.com/thelounge/thelounge
synced 2025-02-17 05:38:25 +00:00
Merge pull request #2721 from thelounge/xpaw/fix-query-away-spam
Fix displaying away message multiple times in query windows
This commit is contained in:
commit
0569ee2269
1 changed files with 10 additions and 1 deletions
|
@ -34,6 +34,14 @@ module.exports = function(irc, network) {
|
||||||
return;
|
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);
|
user = chan.getUser(data.nick);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -45,6 +53,8 @@ module.exports = function(irc, network) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user.away = away;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -59,7 +69,6 @@ module.exports = function(irc, network) {
|
||||||
});
|
});
|
||||||
|
|
||||||
chan.pushMessage(client, msg);
|
chan.pushMessage(client, msg);
|
||||||
user.away = away;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue