De-duplicate nicks in folded JOIN/PART/QUIT lines

This commit is contained in:
Simon Ser 2021-11-05 15:00:08 +01:00
parent 800f5ceb6a
commit 96dd8476ad

View file

@ -297,7 +297,9 @@ class FoldGroup extends Component {
return;
}
let plural = byCommand[cmd].length > 1;
let nicks = new Set(byCommand[cmd].map((msg) => msg.prefix.name));
let plural = nicks.size > 1;
let action;
switch (cmd) {
case "JOIN":
@ -317,9 +319,7 @@ class FoldGroup extends Component {
content.push(", ");
}
let nicks = byCommand[cmd].map((msg) => msg.prefix.name);
content.push(createNickList(nicks, createNick));
content.push(createNickList([...nicks], createNick));
content.push(" " + action);
});