Some exception is not loggable, which won't be logged by
MWExceptionhandler::logException(), we should log it in
the debug log for debugging purpose
Change-Id: I709c45f7e47afacb98be3a869eb5b70660e18f48
The only issue is that the badge is not up to date till
you refresh the page, I think that's fine for now
Change-Id: I585b4cc185bf859ddb06829df75309ff3d56d8b8
* Moved most of the content from notify to getEventNotifyTypes
* Added phpunit test verifying per-event config overrides defaults
* Remove special-snowflake welcome handling with proper configuration
Change-Id: Ic1aae11d37f23f2b7b8abe3c1edaa414e29be021
The code was passing the notifyTypes in the hook for each user, but
the second user would get passed whatever made it through the first
user.
It is unlikely this is intended. Give each user a fresh set of the
configured notify types.
Change-Id: I13059d380ea54c71cd1c062fd803897f5e5ad2b8
The new locateUsersWatchingTitle implementation could end up returning
thousands of users, currently on enwiki there are 25 titles with more
than 10k subscribed users and aprox 550 titles with more than 1k subscribed
users.
This switches the user collection to an iterator based implementation so that
we no longer need to have the entire users list at any one time.
Change-Id: I3d3fa9328f348bb48682d3658622952ce82d3925
Replace implementation specific code with generalized user-locator
implementations that can be re-used by more notifications in other
extensions.
This patch adjusts the `user-locators` notification parameter to allow
arrays which facilitate passing options to the locator.
Previously(still works):
'user-locators' => array( 'foo', 'bar' ),
New functionality:
'user-locators' => array(
'foo',
array( 'bar', 42 )
)
In the second example the callback specified by `bar` will receive
an EchoEvent as the first argument and array( 42 ) as its second
argument.
Change-Id: I7305279bc91d1e40e7054e2fd42a819a35526b82
There are a variety of generic strategies you could define to choose
which users should be notified about an event, such as 'users watching
the title' or 'talk page owner' (User_talk only).
This adds a new way to generically implement these in Echo and expose them
to other extensions rather than having each extension implement these
generic strategies themselves.
This patch only converts one notification, edit-user-talk. The remaining
notifications will be converted in future patches. The first user of this
will be Flow for notifying all users watching a particular talk page in
I4e46a9c003fbdde274b20ac7aef8455eab4a5222
The users watching title implementation provided here is minimalist, a larger
refactor to accomidate pages with thousands of watchers is being handled
in I3d3fa9328f348bb48682d3658622952ce82d3925
Change-Id: I19bb6a794d22565f3bb5421de92426d390197796
Provide users a better user experience by catching and logging
errors with Echo notifications.
Bug: 60906
Change-Id: Iee93a05c6eed468af8bbfa60249df0819c49c45b
This is in case job queue is picking up the job too fast when the current
transaction is not completed and job queue is trying to access non-committed data
When job is popped, some of the object is re-initialized from the database, this will
handle the replication lag
Change-Id: Ia7debb4db0103f27a3e326beb52db0f63bc7c0bc
With this change we will no longer be relying on JS for the badge
functionality. This will prevent the flash of unstyled content,
and allow wikis to locally override the styling (since the unread
class is now applied immediately).
I also went ahead and made the badge styling more closely match the
talk page message alert styling per Vibha.
Also removed the old full link optional behavior since we weren't
using it, and it would have been a pain to maintain.
Bug: 48165
Bug: 48001
Change-Id: Ie85d66afd5181d487d0bb2776ae14b121ea50d88
Implements whitelists and blacklists for notification agents to assist
in filtering out unwanted notifications from bots.
Bug: 47946
Change-Id: I0d7e071067c6974fb90cf6c0ba1bd159f46bd5df
Also moving getUserEnabledEvents from EchoBackend to
NotificationController since it has nothing to do with the backend.
Bug: 47664
Change-Id: I4f9682b861d9f035ae45f206c37ec0ae1c09ab64
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
* 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
Since every event is tied to a category, it's better for event object to have it as a member method
Change-Id: I911415284486bb11d13d91366340c5c330317c34
patch set 1:
* Consolidate notification retrieval in API and Special page
* Add load more function to special page with records as old as 7 days ago
* Add support for browsers with javascript disabled
patch set 2:
* Remove trailing whitespaces
patch set 3:
* Fix some i18n issue
* Fix variable names and some exta whitespace
* Load core css files on special page rendering
Change-Id: Ic69e430b5eb196e5223a2bb6b1d447ef257d559b
1. Skip invalid notification events
2. Add formatting to notifcation count, for example, if the count is over 99, we just show 99+
patch set 2:
* fix trailing whitespace
patch set 3:
* remove extra whitespace and indentation
patch set 4:
* change function name from gatherValidEchoEvent() to gatherValidEchoEvents()
* add more descriptive documentation
Change-Id: I81a135c24f64fa1aace4dd2631e9b88bbe22d3d0
BeforeFormatEchoNotification and BeforeCreateEchoEvent Hooks would be executed multiple times because
* An action may fire multiple notification events
* The notification flyout and page have multiple notifications
we only want these hooks to run once to gather valid formatter and event
Change-Id: Ifff0ad34f3c44c31d88f982fd110ad3399ff5bd0
Basically having fun with the code analyzer.
Also:
* remove unused local variable assignments
* missing return values
* CSS optimizations.
* Initialize possible unset variables.
Change-Id: I77aa08ecb48eeda08f14dc38d7f35d57ea9fa110