From d3a97b4faf0f7635f0c5acc39742a647cd703aba Mon Sep 17 00:00:00 2001 From: apa420 Date: Fri, 31 Aug 2018 14:53:51 +0200 Subject: [PATCH] Fixed #691 --- src/providers/twitch/IrcMessageHandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index 9aabbc91d..366511a2f 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -223,7 +223,10 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message) if (!builder.isIgnored()) { app->twitch.server->lastUserThatWhisperedMe.set(builder.userName); - MessagePtr _message = builder.build(); + // (hemirt) the underlying message is non const declared, but then + // returned by the builder as ptr to const + std::shared_ptr _message = + std::const_pointer_cast(builder.build()); if (_message->flags.has(MessageFlag::Highlighted)) { app->twitch.server->mentionsChannel->addMessage(_message); @@ -233,6 +236,7 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message) if (getSettings()->inlineWhispers) { app->twitch.server->forEachChannel([_message](ChannelPtr channel) { + _message->flags.set(MessageFlag::DoNotTriggerNotification); channel->addMessage(_message); // }); }