common: Exclude ignored messages in buffer activity
authorShane Synan <digitalcircuit36939@gmail.com>
Sun, 21 Jun 2020 23:36:38 +0000 (19:36 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 3 Oct 2020 16:07:50 +0000 (18:07 +0200)
commitfce08b4580057ae5d0515f8c68ed3f54c5ddbbc2
tree1a862b92feadfbd7e77d32eeb0d9e67a5e003f04
parent632dd02da3a825f1e38730d73f3a2be518a99689
common: Exclude ignored messages in buffer activity

Add a new message flag, 'Ignored', tracking if the message matched an
ignore rule when received.  In practice, this refers to dynamic ignore
rules (SoftStrictness), as permanent ignore rules (HardStrictness)
will drop the message entirely.  Simple clients/bots may use this to
apply ignore rules without having to implement the entire regular
expression rules.

Exclude messages that match an ignore rule when updating
bufferActivity and highlightCount, fixing the appearance of new
activity/highlights from ignored messages.

Fixes #1511

NOTE: Using the 'Ignored' flag is not recommended for full clients as
they will need to locally reveal hidden messages when specific dynamic
ignore rules are disabled.

Clean up leftover comment on serializing sender prefixes.

Co-authored-by: Janne Koschinski <janne@kuschku.de>
src/common/message.cpp
src/common/message.h
src/core/SQL/PostgreSQL/select_buffer_bufferactivity.sql
src/core/SQL/PostgreSQL/select_buffer_highlightcount.sql
src/core/SQL/SQLite/select_buffer_bufferactivity.sql
src/core/SQL/SQLite/select_buffer_highlightcount.sql
src/core/corebuffersyncer.h
src/core/coresession.cpp