mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
More accurate name for flag (MessageFlag::DoNotLog), disable logging for
sent whispers.
This commit is contained in:
parent
89f3a3f3ea
commit
3ddac8b12a
4 changed files with 9 additions and 6 deletions
|
@ -72,7 +72,7 @@ void Channel::addMessage(MessagePtr message,
|
||||||
}
|
}
|
||||||
|
|
||||||
// FOURTF: change this when adding more providers
|
// 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);
|
app->logging->addMessage(this->name_, message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,11 +206,14 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
||||||
|
|
||||||
app->twitch.server->sendMessage("jtv", text);
|
app->twitch.server->sendMessage("jtv", text);
|
||||||
|
|
||||||
|
auto overrideFlags = boost::optional<MessageFlags>(messagexD->flags);
|
||||||
|
overrideFlags->set(MessageFlag::DoNotLog);
|
||||||
|
|
||||||
if (getSettings()->inlineWhispers)
|
if (getSettings()->inlineWhispers)
|
||||||
{
|
{
|
||||||
app->twitch.server->forEachChannel(
|
app->twitch.server->forEachChannel(
|
||||||
[&messagexD](ChannelPtr _channel) {
|
[&messagexD, &overrideFlags](ChannelPtr _channel) {
|
||||||
_channel->addMessage(messagexD);
|
_channel->addMessage(messagexD, overrideFlags);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ enum class MessageFlag : uint16_t {
|
||||||
Untimeout = (1 << 10),
|
Untimeout = (1 << 10),
|
||||||
PubSub = (1 << 11),
|
PubSub = (1 << 11),
|
||||||
Subscription = (1 << 12),
|
Subscription = (1 << 12),
|
||||||
Whisper = (1 << 13),
|
DoNotLog = (1 << 13),
|
||||||
AutoMod = (1 << 14),
|
AutoMod = (1 << 14),
|
||||||
RecentMessage = (1 << 15),
|
RecentMessage = (1 << 15),
|
||||||
};
|
};
|
||||||
|
|
|
@ -261,12 +261,12 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
|
||||||
|
|
||||||
auto overrideFlags = boost::optional<MessageFlags>(_message->flags);
|
auto overrideFlags = boost::optional<MessageFlags>(_message->flags);
|
||||||
overrideFlags->set(MessageFlag::DoNotTriggerNotification);
|
overrideFlags->set(MessageFlag::DoNotTriggerNotification);
|
||||||
overrideFlags->set(MessageFlag::Whisper);
|
overrideFlags->set(MessageFlag::DoNotLog);
|
||||||
|
|
||||||
if (getSettings()->inlineWhispers)
|
if (getSettings()->inlineWhispers)
|
||||||
{
|
{
|
||||||
app->twitch.server->forEachChannel(
|
app->twitch.server->forEachChannel(
|
||||||
[_message, overrideFlags](ChannelPtr channel) {
|
[&_message, &overrideFlags](ChannelPtr channel) {
|
||||||
channel->addMessage(_message, overrideFlags); //
|
channel->addMessage(_message, overrideFlags); //
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue