Page MenuHomePhabricator

Send a diff in email on page changes in addition to URL
Open, NormalPublic

Description

When a user gets a notification that a page has changed, the attached patch
sends a diff of what has changed on the page. This allows a quick viewing of the
changes without having to go to a browser and visit the page.


Version: unspecified
Severity: enhancement

Details

Reference
bz4323

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 8:59 PM
bzimport added a project: MediaWiki-Email.
bzimport set Reference to bz4323.
bzimport added a subscriber: Unknown Object (MLST).
Turnstep created this task.Dec 20 2005, 2:37 PM

Created attachment 1219
Superceded by attachment #1229

attachment mediawiki.enotifshowdiff.patch ignored as obsolete

Created attachment 1229
Show diffs in notification emails, full file if new

Slight modification: show full file if new.

attachment mediawiki.enotifshowdiff2.patch ignored as obsolete

Created attachment 1305
Email diff patch v3

Minor fixes to previous patch.

attachment mediawiki.enotifshowdiff3.patch ignored as obsolete

Created attachment 1495
Allow text diffs in notification emails

Run against latest cvs; has minor cleanups.

attachment email.diff.cvs.patch ignored as obsolete

davidgrant wrote:

oh man, this really does not work in 1.8.1. Many rejected hunks and a failed one
since Messages.php is no longer there.

davidgrant wrote:

diffNotify.patch (foro 1.8.1 but not working)

I have updated this patch to work with 1.8.1. The patch succeeds, but it
doesn't work. I'm not very good at debugging this though...

Attached:

sorin.sbarnea wrote:

What's the current status of this bug/feature?

I consider it quite important and I should add that the diff code it's allready included in RSS feeds.

RSS feeds are currently doing quite a good job in highlighting the diffs but they cannot replace email.

It's not been maintained moving forward, but it does work great, and has been used successfully for years on production wikis. Please vote for it in bugzilla if you would like to see it get more attention. If I get time, I'll try and make an updated version at some point, and post it here.

A preference to set if recipient does or does not want to receive the diff too or link only should come along with this feature.

akgmurphy wrote:

I also think this is very important, but I do not know how to vote for something in bugzilla to make it get more attention.

FT2.wiki wrote:

+1

Now that user talk page edits are being email-notified on major wikis including a diff and not just a bare URL would be very helpful.

john wrote:

Thank you for submitting patches for MediaWiki. I've looked over the patches however I cannot commit them in their current state. I don't think that writing to files and running them through diff is the best method for this. Instead could you possibly use the Diff class? Also, take a look at our coding conventions (especially in relation to spacing)

http://www.mediawiki.org/wiki/Manual:Coding_conventions

Thank you for your continued help!

greg added a subscriber: greg.Jul 14 2015, 4:54 PM
Meno25 removed a subscriber: Meno25.Feb 22 2016, 7:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 22 2016, 7:13 PM

FWIW, this is now a full-blown extension:

EmailDiff

scfc added a subscriber: scfc.Mar 12 2016, 5:30 PM

The extension looks great, but AFAIU the notification paradigm, MediaWiki only sends one notification for each page until the user visits that page again. So you get the diff for the first page and then nothing. IMHO that makes no sense.

I'd find it useful if subscribing to a MediaWiki page would (optionally) generate a non-stopping stream of (collapsed) notifications with diffs (like subscriptions to Wordpress posts, Phabricator tasks, etc.), but receiving only one doesn't feel helpful to me.

Multiple diffs in a single notification would be a separate request, against the bundle/digest notifications, when these will exist for watchlist as well. Receiving one notification for each change is T33928: Enable users to set their preferences to receive watchlist notifications regardless of whether the page has been visited.

I'd find it useful if subscribing to a MediaWiki page would (optionally) generate a non-stopping stream of (collapsed) notifications with diffs

The RSS/Atom feeds already do that, FWIW.

scfc added a comment.Mar 13 2016, 12:33 PM

[…]

I'd find it useful if subscribing to a MediaWiki page would (optionally) generate a non-stopping stream of (collapsed) notifications with diffs

The RSS/Atom feeds already do that, FWIW.

Yes, but not by mail. I use my mail client as an organizer where I read, reply/work on and delete notifications from various sources. For RSS feeds I either need to use a separate tool that is way less versatile or convert the feeds to mails. In addition, RSS feeds can retroactively change if some revision is deleted, etc. Notifications by mail on the other hand are a true archive.

In T6323#2114893, @scfc wrote:

The extension looks great, but AFAIU the notification paradigm, MediaWiki only sends one notification for each page until the user visits that page again. So you get the diff for the first page and then nothing. IMHO that makes no sense.

Yeah, good point, I should mention in the README that I usually end up hacking EmailNotification.php to remove the watchlist part of the WHERE clause inside it to get around that issue.

Nemo_bis added a comment.EditedApr 15 2016, 3:21 PM

For RSS feeds I either need to use a separate tool

Not necessarily, there are email clients which handle RSS feeds too. But let's not turn this report into a discussion on email (de)merits.