Commit graph

77 commits

Author SHA1 Message Date
bsitu 71f250e0c6 (bug 47912) Visiting talk page should mark talk notif as read
This needs some more manual testing and adding unit testing

Change-Id: Iadfe3cf7927d5318f89ba17f067000f9399060af
2013-05-29 20:43:57 -07:00
bsitu e50f5a55a6 (bug 48821) Echo badge count always lags by 1
This bug was introduced during fixing the implicit database transaction,
the badge count logic happens before the transaction completes on idle,
moving the badge count code to only after a successful notification creation
should solve the issue

Change-Id: Ia564ed0d386e7cf2da1af3d23ae83d71ad472df5
2013-05-25 19:44:09 -07:00
jenkins-bot 108d525159 Merge "Copy tweaks to Echo Notification Emails" 2013-05-22 19:53:46 +00:00
jenkins-bot 021a9213be Merge "(bug 48521) Echo should not implicitly commit other transaction" 2013-05-22 19:37:41 +00:00
jenkins-bot f997fda13a Merge "Add EventLogging to capture Echo preference change" 2013-05-22 00:46:55 +00:00
bsitu 5602daa277 Add EventLogging to capture Echo preference change
Change-Id: I14cee0bf2e04cc24196b9aa30baa3253c9989463
2013-05-21 17:33:43 -07:00
jenkins-bot 56764de9fb Merge "Make return type consistent" 2013-05-21 22:43:21 +00:00
jenkins-bot 3b5a2f0d14 Merge "Notification agent whitelist and blacklist" 2013-05-21 01:03:40 +00:00
Erik Bernhardson c0b0d78e50 Notification agent whitelist and blacklist
Implements whitelists and blacklists for notification agents to assist
in filtering out unwanted notifications from bots.

Bug: 47946
Change-Id: I0d7e071067c6974fb90cf6c0ba1bd159f46bd5df
2013-05-20 16:36:28 -07:00
lwelling fa84e0edb7 Copy tweaks to Echo Notification Emails
Bug: 47846
Change-Id: Ia054daa8053032e5b71a7724c22897655a7fc326
2013-05-20 12:07:15 -07:00
jenkins-bot e6769b3391 Merge "Accept diffs formatted by UnifiedDiffFormatter" 2013-05-20 17:43:20 +00:00
bsitu 4a581f7882 Make return type consistent
Notification count should return 0 if user has no enabled notification type

Change-Id: Ice8f524349a3b760c00aeac64c3a47ba5ecec8db
2013-05-17 14:16:14 -07: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 51aa0de16a (bug 48521) Echo should not implicitly commit other transaction
Change-Id: I30abd7155b12370aea97218080cc8798f7f0df55
2013-05-15 17:36:04 -07:00
jenkins-bot 10713e0a0b Merge "Fix notification listing query." 2013-05-14 17:13:41 +00:00
jenkins-bot ceba6083ad Merge "Add new EventLogging schema: EchoMail along with code refactor" 2013-05-14 00:48:21 +00:00
bsitu 40d962bf33 Fix notification listing query.
In some rare cases, an event with a bigger event_id may have a smaller timestamp,
in such cases, those records will not get pulled by the existing query, since
it's always filtered by <= notification_timestamp AND < event_id

Change-Id: I61620a9b93331814ad42253ca380a31301555cda
2013-05-13 17:21:31 -07:00
jenkins-bot 9a2f91e18f Merge "(bug 48054) Echo API should use a standard continue parameter" 2013-05-13 23:23:04 +00:00
bsitu ce78c973f3 Add new EventLogging schema: EchoMail along with code refactor
Change-Id: I7f9ec99d27b69abb14aa89540e424f1e0bcd8160
2013-05-07 16:59:24 -07:00
jenkins-bot bdb4038ceb Merge "(bug 47910) Minor edit should not trigger talk page notif" 2013-05-06 20:50:36 +00:00
bsitu f47349e303 (bug 47910) Minor edit should not trigger talk page notif
This patch makes Echo talk page notification mimic the existing Orange Bar and Email talk page notification
for minor edit.

For the Orange Bar, minor edit notification is sent if the editor does not have nominornewtalk
permission.

There are additional rules for the email, minor edit notification is sent if global $wgEnotifMinorEdit
is true and notification recipient has enotifminoredits option on.

Change-Id: Ib3835c4dd57a3686b227c44710a14ab06cded166
2013-05-06 10:31:55 -07:00
bsitu c130197682 Add extra security check to Echo API to prevent vandalism
1. Only trigger mark as read if the unread notification count is > 0
1. Add a limit to the number of notification that can be marked as read
2. Only update those records with read_timestamp = null

Change-Id: I12456c504787f45f594ef9283e98d98692956935
2013-05-04 19:58:37 -07:00
bsitu a70208e8fe (bug 48054) Echo API should use a standard continue parameter
Change-Id: I1d5333db4a4d58a1ecfa8dfe562cda5a35093f8b
2013-05-03 18:15:46 -07:00
ebernhardson db2669d7a0 Accept diffs formatted by UnifiedDiffFormatter
GNU diff and mediawiki's internal UnifiedDiffFormatter do not have
the same default formats.  Here we adjust the output of the internal
diff to match gnu diff as is expected by DiscussionParser.
Bug: 41689

Change-Id: Ib83cacab41adfbdfa8e122c0494b266d4caefc83
2013-04-29 17:21:13 -07:00
kaldari 5a4704e357 Only create notifications that are wanted by the recipients
Also moving getUserEnabledEvents from EchoBackend to
NotificationController since it has nothing to do with the backend.

Bug: 47664
Change-Id: I4f9682b861d9f035ae45f206c37ec0ae1c09ab64
2013-04-28 11:09:15 -07:00
bsitu e9d042283c Remove static object cache to avoid cross wiki related issue
Some script like job runners are running against multiple wikis, caching the object would make later wikis use the incorrect object, it's global variable anyway, there is no need to cache it

Change-Id: I427a5cefbd607aaf897dfa07087e381faffea495
2013-04-18 20:50:48 -07:00
bsitu b34e30cefb Fix a possible db cache issue for job runner
Do not cache db object, this may be causing issue for inter wikis

Change-Id: I127fe05c919c1d20d466c7281f01eef1983270de
2013-04-18 16:01:12 -07:00
bsitu 79e66c4268 Remove the redundant db, lb static cache layer
They are already cached in db and lb object

Change-Id: I3e4db98a3eecdf184db64274b3914eec076af905
2013-04-18 14:33:38 -07:00
jenkins-bot 5833846c44 Merge "Add 'Mark all as read' button to overlay" 2013-04-18 18:41:47 +00:00
jenkins-bot 5f21312587 Merge "Email digest header tweaks" 2013-04-18 18:20:57 +00:00
jenkins-bot a534f7b239 Merge "Split out notification emails to a separate from address so they can be configured as specified for launch." 2013-04-18 18:13:37 +00:00
jenkins-bot 3669ea0972 Merge "Add exception to email job so error will be tracked" 2013-04-18 18:13:28 +00:00
lwelling e1f03a8c0e Split out notification emails to a separate from address so they can
be configured as specified for launch.

Part of https://bugzilla.wikimedia.org/show_bug.cgi?id=46670

Change-Id: I06a73aae95bc4b6776a0554b624eccfc4602bc65
2013-04-18 13:55:13 -04:00
bsitu f5807257b1 Add exception to email job so error will be tracked
Change-Id: I59ad29ddcf961f4d5582095b04eb77f616bc40c0
2013-04-18 10:30:27 -07:00
kaldari 9448c6cab0 Add 'Mark all as read' button to overlay
Button is only shown if there are more unread notifications than
fit in the overlay.

To avoid performance issues, this version only works for cases where
the number of unread notifications is less than the maximum count
(99 currently). Otherwise the button to mark all as read isn't
displayed (it's also limited on the server-side for good measure).

Bug: 47092
Change-Id: Ifcb0a436e2b31062741c441cca239d35ddefa0e1
2013-04-18 00:29:36 -07: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 a98aaacf38 Add nextSequenceValue() to support dbs like PostGres
Change-Id: I7af8391fc88d0336b83dba449f52709f309b6833
2013-04-17 13:58:13 -07:00
jenkins-bot d9a4bb7bb9 Merge "Pref for showing notifications" 2013-04-17 17:15:51 +00:00
Kaldari 6388779640 Pref for showing notifications
If this pref is turned off, we revert to the old orange bar talk
page notifications. Depends on core change Ifc8fbaf8.

Bug: 46550
Change-Id: If21f3aac51e484c5e077c7f4b5a2218e8b71ed2a
2013-04-17 09:55:05 -07:00
bsitu 8e32625e6e Should not send bundle emails if users change mail option
If a user switches to email digest, we should not send or schedule any bundle emails, otherwise, a user may keep getting bundle emails till bundle cycle reset

Change-Id: Id8e4f39cad4c61dc9a044558307f0d654193cd49
2013-04-11 21:40:39 -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
bsitu 2be8a547a0 Add external db support to Echo
Change-Id: I84b0d904795d858d88d8e52c22f00d81c0e81303
2013-04-09 17:59:17 -07:00
bsitu 7ca8d2e4a2 (bug 47023) Add array type check before being used in foreach loop
Change-Id: I28e7f1a52b337ee0a4b012ad31e8054c8f6798ed
2013-04-08 16:43:18 -07: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
bsitu a65a00b709 use numParams() for numeric argument
Change-Id: I8af2ca9067a6b7ae900b9d64e7c8b2be0948dab7
2013-03-24 08:19:40 +00: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
Kaldari 6e8aa9b808 Merge "(bug 46046) Notification should not be created for anon users" 2013-03-15 00:33:49 +00:00
bsitu 345fdb81e2 (bug 46051) mentioned users should not be as object in database
Change-Id: Id96ade333d8150fdc357db47cba9a609f9e7e108
2013-03-13 12:30:20 -07:00
bsitu ded706dd73 (bug 46046) Notification should not be created for anon users
Anon users would not see or receive notifications, it is a waste of storage space

Change-Id: Id150be111337f434d0f1471bb8049ed75a0c53a5
2013-03-12 15:52:00 -07:00