KockaAdmiralac / KockaLogger

Parses IRC logs of activity across Fandom, then relays it into a Discord channel, searches for spam/vandalism and more.
GNU General Public License v3.0
8 stars 9 forks source link

Pre-filtering interested messages in logger module #24

Open KockaAdmiralac opened 5 years ago

KockaAdmiralac commented 5 years ago

Description

The logger module is telling the client it's interested in messages that are going to be filtered out by the filters afterwards, causing KockaLogger to make unneeded API/Redis requests.

Reproduction steps

Steps to reproduce the behavior:

  1. Set up a Discussions-only logger for a wiki.
  2. Set up an HTTP request logger.
  3. Create a page on the wiki.
  4. Check whether an API request was made to fetch the page title.

Expected behavior

There should be no interest shown in messages that aren't going to be shown.

Notes

Doing filtering inside interested() may create different issues due to titles not being the page's actual titles before the title information is checked. A different configuration option may need to be set up for this.