From d6c5dd6d6c78daeff67eeefea4f29b07c6b4845a Mon Sep 17 00:00:00 2001 From: hemirt Date: Wed, 20 Mar 2019 20:58:21 +0100 Subject: [PATCH] do not disable whispers on timeout changed order to short-out the if clause when its not the correct user of the message --- src/common/Channel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/Channel.cpp b/src/common/Channel.cpp index c3492962..6c84c253 100644 --- a/src/common/Channel.cpp +++ b/src/common/Channel.cpp @@ -154,8 +154,9 @@ void Channel::addOrReplaceTimeout(MessagePtr message) for (int i = 0; i < snapshotLength; i++) { auto &s = snapshot[i]; - if (s->flags.hasNone({MessageFlag::Timeout, MessageFlag::Untimeout}) && - s->loginName == message->timeoutUser) + if (s->loginName == message->timeoutUser && + s->flags.hasNone({MessageFlag::Timeout, MessageFlag::Untimeout, + MessageFlag::Whisper})) { // FOURTF: disabled for now // PAJLADA: Shitty solution described in Message.hpp