From b1e891b12231252d7ae3fe453938123e41cda494 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Sat, 20 Nov 2021 12:21:42 +0000 Subject: [PATCH] Fixed Chatterino attempting to send empty messages in IRC (#3355) Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/providers/irc/IrcChannel2.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba63780f823..5b7b3cf9d05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ - Bugfix: Fixed IRC ACTION messages (/me) not being colorized properly. (#3341) - Bugfix: Fixed splits losing filters when closing and reopening them (#3351) - Bugfix: Fixed the first usercard being broken in `/mods` and `/vips` (#3349) +- Bugfix: Fixed Chatterino attempting to send empty messages (#3355) - Dev: Add GitHub action to test builds without precompiled headers enabled. (#3327) - Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103) - Dev: Add benchmarks that can be compiled with the `BUILD_BENCHMARKS` CMake flag. Off by default. (#3038) diff --git a/src/providers/irc/IrcChannel2.cpp b/src/providers/irc/IrcChannel2.cpp index 940a7441047..123ae738de0 100644 --- a/src/providers/irc/IrcChannel2.cpp +++ b/src/providers/irc/IrcChannel2.cpp @@ -18,6 +18,10 @@ IrcChannel::IrcChannel(const QString &name, IrcServer *server) void IrcChannel::sendMessage(const QString &message) { assertInGuiThread(); + if (message.isEmpty()) + { + return; + } if (message.startsWith("/")) {