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 created this task.Dec 18 2015, 1:12 AM
Catrope raised the priority of this task from to Normal.
Catrope updated the task description. (Show Details)
Catrope added a subscriber: Catrope.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 18 2015, 1:12 AM

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?

@Jalexander is probably a good start? :)

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

Mattflaschen-WMF added a comment.EditedFeb 2 2016, 9:52 PM

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.

Krenair added a subscriber: Krenair.Feb 2 2016, 9:58 PM

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 T125594: 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.

SBisson claimed this task.Feb 10 2016, 1:19 PM
SBisson set Security to None.

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.

jcrespo removed a subscriber: jcrespo.Feb 12 2016, 7:56 PM

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? ;-)

Catrope added a comment.EditedFeb 12 2016, 9:14 PM

Which James? ;-)

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

Etonkovidova added a subscriber: Etonkovidova.EditedFeb 15 2016, 11:58 PM

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

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

jmatazzoni closed this task as Resolved.Feb 16 2016, 4:43 PM