Commit graph

10 commits

Author SHA1 Message Date
Ed Sanders 6d655dee0a Remove DiscussionToolsEnableTopicSubscriptionBackend config
This is now deployed on all wikis, and going forward I don't think
we need to make this configurable.

Change-Id: I231976267ba6cdfeec622efaa15983a84c330649
2022-02-04 18:22:10 +00:00
libraryupgrader 26b69d2c70 build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I76996ed939d706739d2094077c64eeca6f51126a
2021-09-08 23:14:53 +00:00
Bartosz Dziewoński c70a203111 Inject ConfigFactory in API modules
…plus minor tweaks.

Change-Id: I80ded8bac836f4a49d61c51c4d17b48687628986
2021-09-07 18:36:12 +02:00
Bartosz Dziewoński 6dd90eda4a Improve discussiontoolssubscribe API documentation
Bug: T280314
Change-Id: I0987faac2cd8c5276a37869212fa968f0d642c09
2021-08-23 18:40:00 +00:00
Bartosz Dziewoński bb5054435f ApiDiscussionToolsSubscribe: Remove redundant checks
$user is guaranteed to be a User object.

Also, while we're here:
* Remove an unnecessary TODO. There's no need for a more specific
  error message, this one is just fine, other extensions use it too.
* Replace isAnon() with !isRegistered(). It'll probably be deprecated
  soon, because the new UserIdentity interface doesn't include it.

Change-Id: Ifbe98f4eccef79deee6bdb54c1bccf49807a9563
2021-08-23 20:39:18 +02:00
Bartosz Dziewoński bcd92a5d33 Minor cleanups in topic subscription code
For automatic topic subscriptions, I plan to introduce a third
subscription state to indicate them. This patch includes minor tweaks
I wanted to add while working on that:

* Introduce constants instead of numbers
* Remove a TODO that doesn't seem like a good idea any more
* Remove a `"length": 1` on sub_state that did not do anything
  (but it might have been meant to indicate that it was supposed
  to be a boolean, which would be wrong)

Bug: T284836
Change-Id: I6e6096968ad38510102287bccd349090b6ca4280
2021-08-17 22:22:15 +02:00
Bartosz Dziewoński 067f0c36de Config option to enable topic subscriptions backend and dtenable=1 URL parameter
…without making the topic subscriptions feature available in user preferences.

Follow-up to these commits, which added these checks in ad-hoc ways:
* 9420f22e9d
* f3422f40a6
* 23a490deca
* a555db7892

Bug: T284491
Change-Id: If2e3fb1e06d1cc489fbca14796ed77c83bb52991
2021-06-14 16:18:18 +02:00
Bartosz Dziewoński 6a50d1203c Limit number of topic subscriptions per user
Per Manuel Arostegui in T263817#7033384. The limit is 5000.
(I picked it arbitrarily, there's no real rationale for it.)

Also log a warning when any user reaches half of the limit,
so that we might make a decision about changing this mechanism
before it starts affecting users. Maybe at that time we'll
have data to show that it's safe to remove the limit.

Bug: T263817
Change-Id: I18a8ee0ad7383759229c5721d5253fb591457d4d
2021-05-25 17:16:24 +02:00
Ed Sanders f3422f40a6 Disable topic subscriptions API when feature is unavailable
Bug: T279671
Change-Id: Ib5a233329e7e6697c198bc0ae10c770282fd9470
2021-04-12 15:04:07 +00:00
Ed Sanders 0bf7539eb9 Topic subscription action API
Bug: T264885
Change-Id: Ie4ddbcef8769c124039a72f544702c9a88bc49eb
2021-04-06 21:25:24 +00:00