Page MenuHomePhabricator

Add ability for extensions to send emails on category changes and note whether a category was added in a machine readable way
Closed, ResolvedPublic

Description

CategoryMembershipChange is great, but it doesn't have a machine-readable way to see if the category has been added or removed from the page. We could parse the comments, but that would rely on reading the comments and matching the message against the translated strings.

I'd like to add some parameters to CategoryMembershipChange::notifyCategorization() and RecentChanges::newForCategorization so that we can update what is in the rc_params db field with information about whether the category was added or removed from the page.

I think this would allow backwards-compatibility without any schema changes.

Adding @Addshore since he created did a lot of category watching work in core, including CategoryMembershipChange which I want to update here. I'm hoping @Addshore can help me get to +2 on the patch.

Adding @Seanchen since he has been working a lot on CategoryWatch and I want to get his input on using this rather than an additional wikitext parse to get category changes.

Related Objects

Event Timeline

Also, I'd like to change when the AbortEmailNotification hook is called, so that it is called before rc_type is checked to see if it is a categorization change.

Change 376070 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/core@master] Note whether a category was added in a machine readable way

https://gerrit.wikimedia.org/r/376070

Change 376070 merged by jenkins-bot:
[mediawiki/core@master] Note whether a category was added in a machine readable way

https://gerrit.wikimedia.org/r/376070