Commit graph

13 commits

Author SHA1 Message Date
Bartosz Dziewoński bd27a46deb Fix revealing content of deleted revisions in notifications
If the revision from which we generated the notification has been
deleted, we shouldn't include the content snippet, nor the direct link
to the comment (because the fragment ID is generated from the content).

This matches how Echo handles mention notifications.

Change-Id: Ica939f3a4efd39d0c295511d58280d3f9d584129
2021-06-03 02:45:15 +02:00
Bartosz Dziewoński 0dfb34eb50 Avoid parsing the comment snippet in notifications as wikitext
As it happens, most of Echo does not actually parse this message,
but it is for some reason parsed in HTML email notifications.

Change-Id: I414cd242d9bcc4d8b5a1c2a2a71be9e5f00ea8be
2021-06-03 02:43:56 +02:00
Bartosz Dziewoński fd080b7043 Ensure you can't get duplicate notifs for edits to your user talk page
We don't display [subscribe] buttons on your user talk page,
but the API still allows those subscriptions.

Use the same approach as for mentions to ensure this doesn't cause
duplicate notifications.

Remove some code in SubscribedNewCommentPresentationModel,
now guaranteed to be unused.

Change-Id: I99a276a48d8562552ed2c54cc0323e8e428845fd
2021-06-03 02:10:33 +02:00
Bartosz Dziewoński 4353b68646 EventDispatcher: Read revision IDs to compare from master
Bug: T284175
Change-Id: Iec99ea0afc659969108104cf5b2627856711544d
2021-06-02 19:47:35 +00:00
Ed Sanders 5a166cfab5 Notification unsubcribe button
Bug: T279150
Change-Id: Ib0bfe3c0dced2108bddbc837a7ddd7bea814e129
2021-06-01 23:29:53 +02:00
libraryupgrader 12fb65b9f1 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I5c152292e83e7f3441e2c08b7d0ad23ac90f194b
2021-05-05 11:14:52 +00:00
Ed Sanders 2f40fd96b1 EventDispatcher: Store comment name in event metadata
This will probably be useful later, so better to ensure
the data is captured now.

Change-Id: I8936ee85a2775ad48839e9c3ebf5bc3d5355c501
2021-04-22 16:23:39 +00:00
Ed Sanders a9537782ac EventDispatcher: Compare new comments by name, not ID
Change-Id: I9d7907dda0f443e4e3b0463a127ea4def68051f3
2021-04-22 16:15:09 +00:00
Ed Sanders e20fcea122 EventDispatcher: Only generate events if author matches user
Bug: T280783
Change-Id: I8a0ea2ac3aefb66b693ee219b88619248bb25fb2
2021-04-22 16:14:01 +00:00
Ed Sanders f6c9508001 Create constants for feature strings
Change-Id: I2d7bf18faf6345a4816c2ebef9744c4e6f62cc40
2021-04-12 14:40:51 +00:00
Ed Sanders 23a490deca Topic subscriptions: Don't generate events when feature is unavailable
Bug: T279671
Change-Id: I8f57b2a1885619db868f25ea68208c2fad5fc040
2021-04-12 14:40:27 +00:00
Ed Sanders 6cafd7735d Topic subscriptions: Only check for events on talk pages
Change-Id: Ic2b7536baea58fb4868cec6f477e72bd8b717e3a
2021-04-12 14:40:13 +00:00
Ed Sanders 0a39c11914 Echo wiring for topic subscriptions
Depends-On: I60818d57552946857077dee93b0adb036621b791
Change-Id: I7e0996843cdd70141e19d5c7ce66122204efa1b7
2021-04-06 23:28:28 +02:00