Page MenuHomePhabricator

Put email subject in notification body of emailuser notifications
Closed, ResolvedPublic

Description

Special:Emailuser has separate fields for the subject and the body of the email, so it seems like we should be able to put the email subject in the emailuser notification about the email.

Event Timeline

Catrope raised the priority of this task from to Medium.
Catrope updated the task description. (Show Details)
Catrope subscribed.

Does MediaWiki store this info anywhere else? I'm not sure what the privacy expectations are w/r to MediaWiki storing info about emails.

It doesn't seem to be stored but it's available at Echo/Hooks.php:1019

Does MediaWiki store this info anywhere else? I'm not sure what the privacy expectations are w/r to MediaWiki storing info about emails.

Who can help figuring out if it's ok to include the email subject in the notifications?

Are the Echo tables part of the DB dumps? If so, we would leak the email subjects, which is private information.

From what I can tell, they are not. They also should not be, since there is private information there already. E.g. exactly which edit you were thanked for is private (thanker and thankee is public).

I don't see any mention of 'Echo' or 'notif' http://dumps.wikimedia.org/enwiki/20160113/ .

Also, it is not in the Labs replicas:

MariaDB [mediawikiwiki_p]> SELECT * FROM page LIMIT 1;
 --------- ---------------- ------------ ------------------- -------------- ------------------ ------------- ---------------- ---------------- -------------------- ------------- ---------- ----------------------- -------------------- 
| page_id | page_namespace | page_title | page_restrictions | page_counter | page_is_redirect | page_is_new | page_random    | page_touched   | page_links_updated | page_latest | page_len | page_no_title_convert | page_content_model |
 --------- ---------------- ------------ ------------------- -------------- ------------------ ------------- ---------------- ---------------- -------------------- ------------- ---------- ----------------------- -------------------- 
|       1 |              0 | MediaWiki  |                   |            0 |                0 |           0 | 0.236047528794 | 20160201112058 | 20160201112524     |     1446376 |      157 |                     0 | wikitext           |
 --------- ---------------- ------------ ------------------- -------------- ------------------ ------------- ---------------- ---------------- -------------------- ------------- ---------- ----------------------- -------------------- 
1 row in set (0.02 sec)

MariaDB [mediawikiwiki_p]> SELECT * FROM echo_event LIMIT 1;
ERROR 1146 (42S02): Table 'mediawikiwiki_p.echo_event' doesn't exist

(mediawikiwiki_p chosen because that uses the main database).

@jcrespo, if the whole table is excluded, should it be listed in https://github.com/wikimedia/operations-software-redactatron/blob/master/scripts/cols.txt ? (It's not currently.)

See also http://quarry.wmflabs.org/query/7187 . That queries the public data and should also fail same as above when it finally executes.

Also, @jcrespo told me that x1 where other Echo data is, is not replicated at all currently (though people would like ContentTranslation which is there to be).

This is working currently, but I've filed T125591: Set up additional filters for Echo tables for further work.

I also filed T125863: Evaluate which Echo tables can be publicly replicated to evaluate if we want any of these to be public.

Anyway, so this is not in any of the dumps or public DB mirrors, so only issue is Legal.

In T121831#1991764, @Mattflaschen wrote:

See also http://quarry.wmflabs.org/query/7187 . That queries the public data and should also fail same as above when it finally executes.

Yeah, it does.

Michelle Paulson in legal has OK'ed use of email snippet in notification 2/8/16. So no holdup there.

Change 269734 had a related patch set uploaded (by Sbisson):
Add subject to email notification body

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

Change 269734 merged by jenkins-bot:
Add subject to email notification body

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

@SBisson, I just want to confirm, since the spec on this was somewhat in discussion (until just now) on the spreadsheet. The intent for the body text on this notification is as follows:

truncated subject line of the email. If the subject line is the default ("Wikipedia email"), then instead show an excerpt from the first line of the email.

Is that what you understood to be the goal?

@SBisson, I just want to confirm, since the spec on this was somewhat in discussion (until just now) on the spreadsheet. The intent for the body text on this notification is as follows:

truncated subject line of the email. If the subject line is the default ("Wikipedia email"), then instead show an excerpt from the first line of the email.

Is that what you understood to be the goal?

It only includes the subject line right now. I'll change it to include the first line of the body if I can reliably detect the default.

I'll change it to include the first line of the body if I can reliably detect the default.>

Thanks Stephane. Again, substituting the email body when the default is present is a good idea, but if implementing it is tricky or involves lots of other moving parts, it's a "nice to have." So investigate, and if detecting the default is a big job let us know. We can simplify the spec.

I'll change it to include the first line of the body if I can reliably detect the default.>

Thanks Stephane. Again, substituting the email body when the default is present is a good idea, but if implementing it is tricky or involves lots of other moving parts, it's a "nice to have." So investigate, and if detecting the default is a big job let us know. We can simplify the spec.

It's easy to do. If we take literally "one line", most notification body would be variations on "Hello,". What I can do is take one line worth of content. In other words, take enough content to fill the entire line of the notification body by ignoring line breaks in the content. Just like gmail is doing.

Change 269845 had a related patch set uploaded (by Sbisson):
Add email body preview to emailuser notification

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

Sorry, I'm a bit late here but I still don't think this is a good idea to do. The email system in MediaWiki is currently designed that no traces of the email contents (aside from hashed stuff in CU) are available in MediaWiki, and adding this info to the notification violates that expectation IMO.

Change 269845 merged by jenkins-bot:
Add email body preview to emailuser notification

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

I agree with @Legoktm, we should keep this separate.

Thanks for your comments Legoktm and Sjoerddebruin. After discussing this, Roan and I ran the issue past James. He doesn't interpret the user expectation that way and is comfortable with this feature.

Which James? ;-)

Forrester. Sorry, didn't notice Alexander was mentioned in an earlier comment, otherwise it would have been less ambiguous.

Checked in betalabs. The email subject is included in email notification and it's truncated if necessary.

Screen Shot 2016-02-15 at 3.48.03 PM.png (286×562 px, 48 KB)

If 'Wikipedia e-mail' is removed from the subject line then the user-entered subject line is displayed; there is no

Add email body preview to email user notification

Screen Shot 2016-02-15 at 3.55.24 PM.png (188×554 px, 27 KB)