From 0aa8cca483332912868457f635add6848a8dc0a4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 26 Jun 2020 14:50:29 +0200 Subject: [PATCH] Enable echo-message --- components/app.js | 7 +++++-- lib/client.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/app.js b/components/app.js index 2ae837d..ac96019 100644 --- a/components/app.js +++ b/components/app.js @@ -477,8 +477,11 @@ export default class App extends Component { var msg = { command: "PRIVMSG", params: [target, text] }; this.client.send(msg); - msg.prefix = { name: this.client.nick }; - this.addMessage(target, msg); + + if (!this.client.enabledCaps["echo-message"]) { + msg.prefix = { name: this.client.nick }; + this.addMessage(target, msg); + } } handleBufferListClick(name) { diff --git a/lib/client.js b/lib/client.js index b32dc68..b705682 100644 --- a/lib/client.js +++ b/lib/client.js @@ -2,7 +2,7 @@ import * as irc from "./irc.js"; // Static list of capabilities that are always requested when supported by the // server -const permanentCaps = ["message-tags", "server-time", "multi-prefix", "away-notify"]; +const permanentCaps = ["message-tags", "server-time", "multi-prefix", "away-notify", "echo-message"]; export default class Client extends EventTarget { ws = null;