diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9274ab7..05d89b9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
- Bugfix: Fixed missing BetterTTV live updates of emotes. (#6132)
- Bugfix: Fixed message contents being cleared when using the close button for replies. (#6145)
+- Bugfix: Fixed the emote popup erroneously logging messages to the `Other` directory. (#6165)
- Bugfix: Handle CMD + BACKSPACE behavior explicitly in main chat dialog input for macOS. (#6111)
- Bugfix: Fixed a small typo in the settings page. (#6134)
- Bugfix: Fixed an issue where Splits could get lost by dragging it onto your Recycle Bin. (#6147)
diff --git a/src/common/Channel.cpp b/src/common/Channel.cpp
index a9d6792d..a8c4b9ce 100644
--- a/src/common/Channel.cpp
+++ b/src/common/Channel.cpp
@@ -81,7 +81,7 @@ void Channel::addMessage(MessagePtr message, MessageContext context,
{
MessagePtr deleted;
- if (context == MessageContext::Original)
+ if (context == MessageContext::Original && this->getType() != Type::None)
{
// Only log original messages
auto isDoNotLogSet =
diff --git a/src/common/Channel.hpp b/src/common/Channel.hpp
index 4c083626..41d5955e 100644
--- a/src/common/Channel.hpp
+++ b/src/common/Channel.hpp
@@ -35,16 +35,28 @@ public:
/**
* @exposeenum c2.ChannelType
*/
- enum class Type {
+ enum class Type : std::uint8_t {
+ /// This channel may not be backed by a real channel.
+ ///
+ /// Messages sent to this channel are not logged.
None,
+ /// Direct
Direct,
+ /// Twitch
Twitch,
+ /// TwitchWhispers
TwitchWhispers,
+ /// TwitchWatching
TwitchWatching,
+ /// TwitchMentions
TwitchMentions,
+ /// TwitchLive
TwitchLive,
+ /// TwitchAutomod
TwitchAutomod,
+ /// TwitchEnd
TwitchEnd,
+ /// Misc
Misc,
};
@@ -135,7 +147,7 @@ public:
protected:
virtual void onConnected();
virtual void messageRemovedFromStart(const MessagePtr &msg);
- QString platform_{"other"};
+ QString platform_;
private:
const QString name_;
diff --git a/src/singletons/Logging.cpp b/src/singletons/Logging.cpp
index 7fef6c29..5d9a95cf 100644
--- a/src/singletons/Logging.cpp
+++ b/src/singletons/Logging.cpp
@@ -34,6 +34,11 @@ Logging::Logging(Settings &settings)
void Logging::addMessage(const QString &channelName, MessagePtr message,
const QString &platformName, const QString &streamID)
{
+ if (platformName.isEmpty())
+ {
+ return;
+ }
+
this->threadGuard.guard();
if (!getSettings()->enableLogging)
@@ -76,6 +81,11 @@ void Logging::addMessage(const QString &channelName, MessagePtr message,
void Logging::closeChannel(const QString &channelName,
const QString &platformName)
{
+ if (platformName.isEmpty())
+ {
+ return;
+ }
+
auto platIt = this->loggingChannels_.find(platformName);
if (platIt == this->loggingChannels_.end())
{
diff --git a/src/singletons/Paths.hpp b/src/singletons/Paths.hpp
index 151db1dc..f2e7f1d9 100644
--- a/src/singletons/Paths.hpp
+++ b/src/singletons/Paths.hpp
@@ -18,7 +18,7 @@ public:
// Directory for settings files. Same as /Settings
QString settingsDirectory;
- // Directory for message log files. Same as /Misc
+ // Directory for message log files. Same as /Logs
QString messageLogDirectory;
// Directory for miscellaneous files. Same as /Misc