Fix subscription messages triggering split highlights (#1519)

Since #1320, subscription messages are treated as highlights in order to
allow customization. This caused subscription messages to highlight the
split(s) the message was received in. This is not intended behavior.

This commit fixes the issue by additionally checking if the
`Subscription` flag is set on a highlighted message.
This commit is contained in:
Leon Richardt 2020-01-26 10:08:25 +01:00 committed by pajlada
parent a078d116d2
commit 93a6c55ed3

View file

@ -648,7 +648,8 @@ void ChannelView::messageAppended(MessagePtr &message,
if (!messageFlags->has(MessageFlag::DoNotTriggerNotification))
{
if (messageFlags->has(MessageFlag::Highlighted))
if (messageFlags->has(MessageFlag::Highlighted) &&
!messageFlags->has(MessageFlag::Subscription))
{
this->tabHighlightRequested.invoke(HighlightState::Highlighted);
}