Add support for incoming REDACT
This does not include support for redacting messages, only reading incoming REDACT messages. See: https://github.com/ircv3/ircv3-specifications/pull/524
This commit is contained in:
parent
ca0cfdcc28
commit
7dd21177bc
4 changed files with 21 additions and 4 deletions
9
state.js
9
state.js
|
@ -361,6 +361,7 @@ export const State = {
|
|||
hasInitialWho: false, // if channel
|
||||
members: new irc.CaseMapMap(null, client.cm), // if channel
|
||||
messages: [],
|
||||
redacted: new Set(),
|
||||
unread: Unread.NONE,
|
||||
prevReadReceipt: null,
|
||||
});
|
||||
|
@ -665,6 +666,14 @@ export const State = {
|
|||
|
||||
return { members };
|
||||
});
|
||||
case "REDACT":
|
||||
target = msg.params[0];
|
||||
if (client.isMyNick(target)) {
|
||||
target = msg.prefix.name;
|
||||
}
|
||||
return updateBuffer(target, (buf) => {
|
||||
return { redacted: new Set(buf.redacted).add(msg.params[1]) };
|
||||
});
|
||||
case irc.RPL_MONONLINE:
|
||||
case irc.RPL_MONOFFLINE:
|
||||
targets = msg.params[1].split(",");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue