More accurate name for flag (MessageFlag::DoNotLog), disable logging for

sent whispers.
This commit is contained in:
moe-ka 2019-02-27 18:30:26 +00:00 committed by moka
parent 89f3a3f3ea
commit 3ddac8b12a
4 changed files with 9 additions and 6 deletions

View file

@ -72,7 +72,7 @@ void Channel::addMessage(MessagePtr message,
}
// FOURTF: change this when adding more providers
if (this->isTwitchChannel() && !overridingFlags->has(MessageFlag::Whisper))
if (this->isTwitchChannel() && !overridingFlags->has(MessageFlag::DoNotLog))
{
app->logging->addMessage(this->name_, message);
}

View file

@ -206,11 +206,14 @@ QString CommandController::execCommand(const QString &textNoEmoji,
app->twitch.server->sendMessage("jtv", text);
auto overrideFlags = boost::optional<MessageFlags>(messagexD->flags);
overrideFlags->set(MessageFlag::DoNotLog);
if (getSettings()->inlineWhispers)
{
app->twitch.server->forEachChannel(
[&messagexD](ChannelPtr _channel) {
_channel->addMessage(messagexD);
[&messagexD, &overrideFlags](ChannelPtr _channel) {
_channel->addMessage(messagexD, overrideFlags);
});
}

View file

@ -27,7 +27,7 @@ enum class MessageFlag : uint16_t {
Untimeout = (1 << 10),
PubSub = (1 << 11),
Subscription = (1 << 12),
Whisper = (1 << 13),
DoNotLog = (1 << 13),
AutoMod = (1 << 14),
RecentMessage = (1 << 15),
};

View file

@ -261,12 +261,12 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
auto overrideFlags = boost::optional<MessageFlags>(_message->flags);
overrideFlags->set(MessageFlag::DoNotTriggerNotification);
overrideFlags->set(MessageFlag::Whisper);
overrideFlags->set(MessageFlag::DoNotLog);
if (getSettings()->inlineWhispers)
{
app->twitch.server->forEachChannel(
[_message, overrideFlags](ChannelPtr channel) {
[&_message, &overrideFlags](ChannelPtr channel) {
channel->addMessage(_message, overrideFlags); //
});
}