diff --git a/CHANGELOG.md b/CHANGELOG.md index cab043d7..e8289f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - Bugfix: Fixed IRC highlights not triggering sounds or alerts properly. (#3368) - Bugfix: Fixed IRC /kick command crashing if parameters were malformed. (#3382) - Bugfix: Fixed crash that would occur if the user tries to modify the currently connected IRC connection. (#3398) +- Bugfix: Fixed IRC mentions not showing up in the /mentions split. (#3400) - Bugfix: Fixed a crash that could occur on certain Linux systems when toggling the Always on Top flag. (#3385) - Bugfix: Fixed zero-width emotes sometimes wrapping lines incorrectly. (#3389) - Bugfix: Fixed using special chars in Windows username breaking the storage of custom commands (#3397) diff --git a/src/providers/irc/IrcServer.cpp b/src/providers/irc/IrcServer.cpp index 72add988..0ccaa8f5 100644 --- a/src/providers/irc/IrcServer.cpp +++ b/src/providers/irc/IrcServer.cpp @@ -8,6 +8,7 @@ #include "providers/irc/Irc2.hpp" #include "providers/irc/IrcChannel2.hpp" #include "providers/irc/IrcMessageBuilder.hpp" +#include "providers/twitch/TwitchIrcServer.hpp" // NOTE: Included to access the mentions channel #include "singletons/Settings.hpp" #include "util/IrcHelpers.hpp" #include "util/QObjectRef.hpp" @@ -184,8 +185,18 @@ void IrcServer::privateMessageReceived(Communi::IrcPrivateMessage *message) if (!builder.isIgnored()) { - channel->addMessage(builder.build()); + auto msg = builder.build(); + + channel->addMessage(msg); builder.triggerHighlights(); + const auto highlighted = msg->flags.has(MessageFlag::Highlighted); + const auto showInMentions = + msg->flags.has(MessageFlag::ShowInMentions); + + if (highlighted && showInMentions) + { + getApp()->twitch2->mentionsChannel->addMessage(msg); + } } else {