Add support for account-notify

This commit is contained in:
Simon Ser 2021-09-21 14:49:32 +02:00
parent 8e631f97ef
commit d12e1109b3
3 changed files with 9 additions and 0 deletions

View file

@ -798,6 +798,8 @@ export default class App extends Component {
case irc.RPL_MONOFFLINE:
case "AWAY":
case "SETNAME":
case "CHGHOST":
case "ACCOUNT":
case "CAP":
case "AUTHENTICATE":
case "PING":

View file

@ -3,6 +3,7 @@ import * as irc from "./irc.js";
// Static list of capabilities that are always requested when supported by the
// server
const permanentCaps = [
"account-notify",
"away-notify",
"batch",
"chghost",

View file

@ -464,6 +464,12 @@ export const State = {
username: msg.params[0],
hostname: msg.params[1],
});
case "ACCOUNT":
let account = msg.params[0];
if (account === "*") {
account = null;
}
return updateUser(msg.prefix.name, { account });
case "AWAY":
let awayMessage = msg.params[0];
return updateUser(msg.prefix.name, { away: !!awayMessage });