mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Add support for account-notify
This commit is contained in:
parent
8e631f97ef
commit
d12e1109b3
3 changed files with 9 additions and 0 deletions
|
@ -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":
|
||||
|
|
|
@ -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",
|
||||
|
|
6
state.js
6
state.js
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue