Commit graph

76 commits

Author SHA1 Message Date
EBernhardson (WMF) e3bdd61952 Merge "Preventing empty payloads from being created when using summary" 2013-09-03 17:40:42 +00:00
kaldari d1463ea6a7 Preventing empty payloads from being created when using summary
Also making sure that footer has some amount of separation from
the notification title even if there is no payload.

Change-Id: I85a1a7989539044a0b0b53e76e70ddee9bb7165c
2013-08-29 15:10:06 -07:00
bsitu 5f50f84bbd Invalid argument supplied for foreach() in BasicFormatter.php
bug: 52897
Change-Id: I28f447af75f699d4bd7d4d045f030e70cea437d6
2013-08-15 17:53:24 -07:00
jenkins-bot 7addcc4470 Merge "Split the code to generate a proper URL/link from setTitleLink()" 2013-08-07 07:12:56 +00:00
kaldari 2f6591febe Making title-params no longer required.
In theory, a notification could not need any contextual information
so there's no reason we should make it required.

Now, if the title-params are not provided in the notifcation
definition, it just sets the value to an empty array.

Change-Id: Iba5ce5cc56010101c5e64976c95b37a215dc99fa
2013-08-01 17:52:47 -07:00
Matthias Mullie 54e2e0f69a Split the code to generate a proper URL/link from setTitleLink()
The reason I'm splitting this is that, not only do I want to create
a link to the 'title', but also for another param (in my case: link
to the AFTv5 permalink page)

Change-Id: I834b50ca144e7d08db830726480da19e1b406a27
2013-07-31 17:07:50 +02:00
bsitu 2c7ec70dc6 The email should be sent in the recipient's language
At the moment it is sent in the sender's language.

Bug: 52298
Change-Id: I7f689963105585cf74a902cf975fffb592135ed4
2013-07-31 02:47:15 +00:00
jenkins-bot 82e97088a1 Merge "(bug 51005) Add secondary link to the archive page" 2013-07-30 08:54:44 +00:00
bsitu 0b1275b9e3 user talk and mention notification improvement
http://www.mediawiki.org/wiki/Echo_%28Notifications%29/Feature_requirements#Improved_Notification_Structure

Change-Id: I2da35e8ed092c42ac95ae34012426834a37c3cde
2013-07-29 18:07:43 -07:00
bsitu 7f33cc98fa (bug 46665) Add HTML email support to email digest
Change-Id: I3b881acbcf4b18fc0401364ea0a6bc993d2c2246
2013-07-23 13:20:33 +02:00
bsitu 2c74f66f18 Add HTML email support to Echo notification
To test the HTML email:

1. install the latest version of php-mail and php-mail-mime package, they are required
   by the core sendmail function to send HTML email
2. set $wgAllowHTMLEmail = true before loading Echo in LocalSetting.php

Change-Id: Ia4b98b14e135742b84f1b0e04589b0efdd24e954
2013-07-23 13:20:33 +02:00
bsitu 353f4e8ab5 (bug 51005) Add secondary link to the archive page
Change-Id: I9b1e8fd76eacda3c4bcb5ffc1e3799204da52960
2013-07-12 11:29:01 -07:00
bsitu 1ebc4b53de Title diff links should not include any fragment
Change-Id: I54d602ad910035033c3ff2741616fd0405c6e290
2013-07-02 14:20:01 -07:00
kaldari 972e14672f New primary and secondary link behavior for Echo
See https://www.mediawiki.org/wiki/Echo/Feature_requirements#Flyout
and https://www.mediawiki.org/wiki/Echo/Feature_requirements#HTML_single_email_notifications

Also includes some related style changes per Vibha

Also removing feedback link from overlay since it's no longer needed

Change-Id: I94aed697e87126ed8ad6d1d416c99bafaa53ac53
2013-06-27 16:12:16 -07:00
Erik Bernhardson 34fbeaf8c9 Respect revision suppression within Echo
Update the echo formatter to properly display suppressed revision content

Bug: 48059
Change-Id: Iee3c9a41ad24c66b0e2abdd5f1375ebdbd74314e
2013-06-18 11:00:50 -07:00
bsitu 801bde9ec3 Remove unused global variable and update function return type
Change-Id: I2f6e0388c2d1218e72b70a69b429884b39dc096f
2013-06-17 21:51:43 +00:00
jenkins-bot 250127669b Merge "Link directly to the edited section from edit-user-talk events" 2013-05-17 00:24:30 +00:00
Erik Bernhardson e058b980b5 Link directly to the edited section from edit-user-talk events
Adjusted the edit-user-talk event creation to detect and record which section
of the talk page was edited. Flyout, special page, and email messages have
been adjusted to use this section title as a URL fragment when available.

Bug: 46937
Change-Id: I161e2ffda2f2540f64de90cc621fb3b69479d0db
2013-05-16 17:13:16 -07:00
bsitu f812389ce5 (bug 48302) Broken link in plain text email notification
Change-Id: I101fe3c1c3dbf913982b9040885b2acc633e711a
2013-05-15 12:34:10 -07:00
jenkins-bot 17b648f18f Merge "Remove dead code" 2013-05-14 07:18:19 +00:00
Erik Bernhardson d49b9a5223 Remove dead code
While writing tests i noticed that this is dead code that will never be called. It
was originally used but several commits have piled up to cause its deprecation.
Upon review of the git history it seems the general idea behind content-* turned
into the 'payload' key. the commentText formatting was moved to payload for future
use, the i18n keys have been pruned.

Change-Id: I5ef360759db53d54a834afc8b71e9c8807de0284
2013-05-13 18:11:42 -07:00
bsitu 792dc034e0 (bug 48302) Trailing dot in link is ignored in plain text email
A random link may contain trailing dot and it doesn't get linked

Change-Id: Ia7d3a4a437438ba473c24b3f4f98bb133cd52954
2013-05-13 15:24:20 -07:00
Matthew Flaschen d3b67e2122 Change icons to use img tags, allowing easier customization:
* Icon can be defined using a path or a URL
* Extensions don't need custom CSS, but add icon through BeforeCreateEchoEvent
* Sites set their notification icon in LocalSettings.php or equivalent

Bug: 46585
Change-Id: Ifc02b653d07de19229dfb2604305e32f3bd595fe
2013-04-29 06:05:40 +00:00
bsitu c7922a366c Email digest header tweaks
Plus adding escape to some of the messages

Bug: 47095
Change-Id: I296de4e5ebe92b737837c7ddcf3f631b16a9cf8b
2013-04-17 14:43:31 -07:00
bsitu d44ed993a2 Add email bundling function to Echo notification
* This patch needs intensive testing on Redis delayed job queue
* This patch is -2 mainly for redis/phpredis are not ready on test/test2/mediawiki

To test this locally, you need to:
* set up Redis and phpredis locally
* add the following to localSettings.php
    $wgJobTypeConf['MWEchoNotificationEmailBundleJob'] = array(
        'class'       => 'JobQueueRedis',
        'redisServer' => '127.0.0.1',
        'redisConfig' => array( 'connectTimeout' => 1 ),
        'claimTTL'    => 3600,
        'checkDelay'  => true
    );
* set $wgMainCacheType to CACHE_DB or memcache
* set $wgEchoBundleEmailInterval to smaller number for testing purpose, 0 to disable email bundling

Change-Id: I9313e7f6ed3e13478cec294b5b8408fe8e941faf
2013-04-11 11:25:14 -07:00
jenkins-bot 841d958bfb Merge "Disabling notification dismiss interface for now per Fabrice" 2013-04-11 17:10:43 +00:00
kaldari e641d6f7c7 Disabling notification dismiss interface for now per Fabrice
Notification categories can still be unsubscribed to in the prefs

Change-Id: I91046f840add2cd6e02b0b91078fd2ac377ca871
2013-04-10 17:22:40 -07:00
jenkins-bot 8f77e67e6f Merge "Making agent param logic consistant" 2013-04-10 17:32:47 +00:00
bsitu cbd88322f2 Add default params to avoid massive if/else block
Change-Id: I966d16525220565e805fda582c5f88a7978faa37
2013-04-05 19:33:01 +00:00
bsitu 6a3624b0e4 Add web bundling function to Echo notification
* add web bundling feature
* unify event_timestamp with notification_timestamp
* remove echo_subscription
* update article_link to page_link notification with new logic
* remove duplicated function from MWDbEchoEmailBatch since it's defined in parent class

Change-Id: I2fa91c44edb020209b468fe13f894d9db3732e69
2013-04-04 10:53:46 -07:00
jenkins-bot e4483d8130 Merge "Some cleanup to Formatter" 2013-04-04 17:48:24 +00:00
Kaldari 002d816de1 Merge "Merge the text of the welcome message into the title." 2013-04-04 17:40:19 +00:00
bsitu 8a02df15c5 Some cleanup to Formatter
* Move dismiss checking logic to event
* Remove unnecessary variables

Change-Id: If224fe6d668788e779109ee96ac28d44faa4b41b
2013-04-02 16:51:14 -07:00
Matthew Flaschen 54af0449d8 Merge the text of the welcome message into the title.
Change-Id: I3422cabe776e84c2231b1212329067fc5b075143
2013-04-02 18:17:20 -04:00
kaldari 1ec788babf Making agent param logic consistant
It doesn't make sense to create 2 tokens for the i18n message in one
case and only 1 token in another case. The current i18n messages are
designed to handle only 1 token for agent (for both grammar and display).

Change-Id: I7ab6b5a7b6731e60d0ea6e9e590c15039fdc4459
2013-03-27 17:17:35 -07:00
kaldari a9f3e3b787 Moving basic titlelink param handling to the parent formatter class...
...since the logic for handling it is there already.

Change-Id: I7dab19caf07f770befb2969eefd0f2ab3337bd94
2013-03-27 15:47:54 -07:00
bsitu 2d0e5ee536 Consolidate messages and fix dismiss title
1. Dismiss title should be based on $event->getCategory() instead of $event->getType()
2. Remove various echo-email-batch-category-header-* messages
3. update echo-dismiss-title-* to echo-category-title-*

Change-Id: I02fc85072f3d5967668c94eb28c8ecff606023d0
2013-03-21 11:22:28 -07:00
bsitu 5c701f80ef Add getCategory() method to event object
Since every event is tied to a category, it's better for event object to have it as a member method

Change-Id: I911415284486bb11d13d91366340c5c330317c34
2013-03-18 16:30:39 -07:00
bsitu 9b1b6b09f1 Keep instance variable 'type' the same visibility as the others
1. Keep it as protected like the rest of the variables and there is an accessor method getType() for external access

2. Add some more documentation

Change-Id: I26b20e6b211a7dbfa96cf57eb87621698015646e
2013-03-14 12:14:43 -07:00
Kaldari 1c9f078ed4 Fixing bug with links in flyout caused by change I76b80db1
Flyout links were being displayed as raw URLs rather than regular links.
Likely caused by a bad rebase merge.

Change-Id: I96b1db67fa919d282ae9abfbd9c039473d400303
2013-03-12 13:53:09 -07:00
bsitu 5526c24375 extract payload from generic format method
This will allow 3rd parties to define their own payload for notification

Change-Id: If3a7c1d7d51beb96379af46617e15f76a32e6c05
2013-03-06 19:12:54 -08:00
Kaldari 1e23f03827 Merge "Add more documentation and code cleanup" 2013-03-06 01:35:12 +00:00
bsitu 85aa4a20a6 Add more documentation and code cleanup
Change-Id: I3bbdd524fdb882f5edd0a0bf5b1efe3321949253
2013-03-05 13:24:03 -08:00
Kaldari 8357f4bd75 Implementing new prefs system for Echo
Change-Id: Id745ed6cf1c92695569597fab6ea662bac8c76c0
2013-03-05 12:20:17 -08:00
Reedy 62a433573f Numerous bits of method parameter documentation
Change-Id: Ie4b2657b5e010311b779aa587aa7fa9fc3f19abb
2013-03-01 10:56:58 -08:00
Andrew Garrett dc6a3cb6d0 Add a "mention" notification
Any user whose user page is linked in a comment on a talk page will get a notification of that.

Weaknesses: Currently this mention notification is additive.
We may want to restrict it to only cases where the user would not
otherwise be notified of the comment

patch set 3:
	* user + instead of array_merge for merging subscription users
	* rename $user to $agent to avoid name confilict in generateMentionEvents()
	* add check for possible null object
	* users should not receive 'mention' notification on their own talk pages

patch set 4:
	* add more descriptive comment
	* check for empty notification list before creating mention event

patch set 5:
	* Fix a parse error, change [ to {

patch set 10:
	* rebase

patch set 11:
	* adding flyout messages, updating params for other messages

Change-Id: I76b80db1f325d9569f36c506d14c8c875bba4a34
2013-02-24 20:38:11 -08:00
Bsitu 567e11bb14 Merge "Fixing notification type to be 'web' in controller" 2013-02-14 20:13:01 +00:00
Kaldari 6347618db5 Fixing notification type to be 'web' in controller
Change-Id: Iab077a77aa75a6ff0cf03acecca38403595dda93
2013-02-14 12:07:23 -08:00
Kaldari 16331eab92 Adding dismiss functionality to flyout overlay.
Change-Id: Ibfbdb2a9f170e1d9b30b50e8639aee25101e71d6
2013-02-14 11:01:03 -08:00
Kaldari af06e26de6 Adding dismiss functionality to special page
Includes new web preferences for Echo

Also adding ability to set dismissability per notification type

Still need to arrange subscription options into a friendly format

Still need to add dismiss functionality to flyout

Change-Id: I484a24b424e69be3640e63b76f82735edae6f13a
2013-02-12 11:33:50 -08:00