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

Unneeded API/Redis requests for talkpage title checking #23

Closed KockaAdmiralac closed 3 years ago

KockaAdmiralac commented 5 years ago

Description

Page title fetching from API was introduced as a method of obtaining the actual page title in case of article comments being submitted on an article whose title is matching article's title in the IRC log but the actual title is much different. Same issue occurs for threads but for a different reason.

However, comments and threads cannot be created for talk namespaces, yet they are being fetched from the API as well. Making KockaLogger skip title checking for talk namespaces is going to save some HTTP requests.

Reproduction steps

Steps to reproduce the behavior:

  1. Set up some HTTP request logging.
  2. Open WikiaRC.
  3. Create a talk page on a wiki with a logger set up.
  4. Check if there's an HTTP request made to fetch the title of that talkpage.
  5. Check if the title logged in WikiaRC is matching the title of the edited page.

Expected behavior

The HTTP request isn't made due to the title in WikiaRC already matching the page's title.

Notes

KockaAdmiralac commented 3 years ago

This will be removed in the UCP updates.