Auto-join when adding new network on irc:// link click

Closes: https://todo.sr.ht/~emersion/gamja/111
This commit is contained in:
Simon Ser committed 2021-11-07 19:47:49 +01:00
1 parent a58befd6d7
commit 74fe6ee944
3 files changed
+72 -9

No files matched your search

+12
View File
@@ -861,4 +861,16 @@ export default class Client extends EventTarget {
this.send({ command: "MONITOR", params: ["-", target] });
}
createBouncerNetwork(attrs) {
let msg = {
command: "BOUNCER",
params: ["ADDNETWORK", irc.formatTags(attrs)],
};
return this.roundtrip(msg, (msg) => {
if (msg.command === "BOUNCER" && msg.params[0] === "ADDNETWORK") {
return msg.params[1];
}
});
}
}