refactor(eventsub): Respect "Hide moderation actions" explicitly (#6041)
This commit is contained in:
@@ -166,16 +166,14 @@ void MessageLayout::actuallyLayout(const MessageLayoutContext &ctx)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this->message_->flags.has(MessageFlag::Timeout) ||
|
||||
this->message_->flags.has(MessageFlag::Untimeout))
|
||||
if (this->message_->flags.has(MessageFlag::ModerationAction))
|
||||
{
|
||||
// NOTE: This hides the message but it will make the message re-appear if moderation message hiding is no longer active, and the layout is re-laid-out.
|
||||
// This is only the case for the moderation messages that don't get filtered during creation.
|
||||
// We should decide which is the correct method & apply that everywhere
|
||||
if (hideModerationActions ||
|
||||
(getSettings()->streamerModeHideModActions &&
|
||||
getApp()->getStreamerMode()->isEnabled()))
|
||||
getApp()->getStreamerMode()->shouldHideModActions())
|
||||
{
|
||||
// Message is being hidden because we consider the message
|
||||
// a moderation action (something a streamer is unlikely to
|
||||
// want to share if they briefly show their chat on stream)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -515,7 +513,8 @@ bool MessageLayout::isReplyable() const
|
||||
|
||||
if (this->message_->flags.hasAny(
|
||||
{MessageFlag::System, MessageFlag::Subscription,
|
||||
MessageFlag::Timeout, MessageFlag::Whisper}))
|
||||
MessageFlag::Timeout, MessageFlag::Whisper,
|
||||
MessageFlag::ModerationAction}))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user