From fd8c7fe4f77a338f3690c3899c106f83c0514774 Mon Sep 17 00:00:00 2001 From: joker-x Date: Wed, 16 Sep 2020 03:53:07 +0200 Subject: [PATCH] Avoid blank messages --- app/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/index.js b/app/index.js index 8e6d9fa..ea303cc 100644 --- a/app/index.js +++ b/app/index.js @@ -790,6 +790,9 @@ class GlobalBindings { if (target === this.thisUser()) { target = target.channel() } + // Avoid blank message + message = sanitize(message).trim() + if (message.length == 0) return; // Send message target.model.sendMessage(message) if (target.users) { // Channel