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:
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(",");
|
||||
|
||||
Reference in New Issue
Block a user