From b0f32dc29bb07f8067e18b5b91372d5711cea95c Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 3 Jun 2018 22:12:17 +0300 Subject: [PATCH] Do not write topic on join to logs --- src/models/msg.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/msg.js b/src/models/msg.js index ed87240b..e057a771 100644 --- a/src/models/msg.js +++ b/src/models/msg.js @@ -37,9 +37,15 @@ class Msg { } isLoggable() { + if (this.type === Msg.Type.TOPIC) { + // Do not log topic that is sent on channel join + return !!this.from.nick; + } + return this.type !== Msg.Type.MOTD && this.type !== Msg.Type.ERROR && this.type !== Msg.Type.BANLIST && + this.type !== Msg.Type.TOPIC_SET_BY && this.type !== Msg.Type.WHOIS; } }