plugins: unblock background triggers #1725
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
tell
,translate
,seen
, andmeetbot
plugins all contain match-any rules to run something on any/every message received. Even with #1724 applied, they still cause log spam whenever any ignored user speaks.Here, I have made the relevant callables in
tell
,translate
, andseen
intounblockable
functions. There's no reason that ignored users shouldn't receivetell
messages, andtranslate
&seen
only collect lines passively for use later when commanded by a non-ignored user.I did not make
meetbot
's callable unblockable, though. That would allow ignored users to appear in meeting logs despite being blocked from using any commands. Unfortunately this means we'll still get log spam on any instance withmeetbot
turned on, but when this is combined with #1721 (which makesfind
's collect-all-lines function unblockable)meetbot
will be the only core plugin that causes such a warning with default settings. We can decide to disable it by default, perhaps.Bonus refactor of
translate
to usebot.memory
instead of a (🤢) global variable.