mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
a3674974f1
Adds DB tables for storing push subscriptions, some DB interaction code for retrieving them within MediaWiki, and a set of API modules for managing them from the outside world. When testing this patch, be sure to run maintenance/update.php to create the new tables, and set $wgEchoEnablePush = true in LocalSettings.php to enable the API new API module. N.B. The current DB schema is centered on app push subscriptions. Web push subscriptions require slightly different handling, since they are provided by browsers as a JSON blob rather than a token string. How to handle web push subscriptions is a question we can defer until the time comes to add web push support. Subscription data is stored in the echo_push_subscription table, with provider names normalized into the echo_push_provider table. We expect to be looking up subscriptions by central user ID, so that column is indexed. The subscription data also includes a column to store SHA256 digests of the subscriber tokens. This is for use as a unique key constraint, since we expect every push token to be univerally unique, and the token values themselves may be too large to reasonably index in MySQL. Bug: T252899 Change-Id: I3928761b3fba12e54ff4850e9a05c68ec7772f62
86 lines
7 KiB
JSON
86 lines
7 KiB
JSON
{
|
|
"@metadata": {
|
|
"authors": [
|
|
"Brad Jorsch",
|
|
"Liuxinyu970226",
|
|
"Matthew Flaschen",
|
|
"Matthias Mullie",
|
|
"Moriel Schottlender",
|
|
"Roan Kattouw",
|
|
"Stephane Bisson",
|
|
"Umherirrender"
|
|
]
|
|
},
|
|
"apihelp-echomarkread-description": "{{doc-apihelp-description|echomarkread}}",
|
|
"apihelp-echomarkread-summary": "{{doc-apihelp-summary|echomarkread}}",
|
|
"apihelp-echomarkread-param-list": "{{doc-apihelp-param|echomarkread|list}}",
|
|
"apihelp-echomarkread-param-unreadlist": "{{doc-apihelp-param|echomarkread|unreadlist}}",
|
|
"apihelp-echomarkread-param-all": "{{doc-apihelp-param|echomarkread|all}}",
|
|
"apihelp-echomarkread-param-sections": "{{doc-apihelp-param|echomarkread|sections}}",
|
|
"apihelp-echomarkread-param-wikis": "{{doc-apihelp-param|echomarkread|wikis}}",
|
|
"apihelp-echomarkread-example-1": "{{doc-apihelp-example|echomarkread}}",
|
|
"apihelp-echomarkread-example-2": "{{doc-apihelp-example|echomarkread}}",
|
|
"apihelp-echomarkread-example-3": "{{doc-apihelp-example|echomarkread}}",
|
|
"apihelp-echomarkseen-description": "{{doc-apihelp-description|echomarkseen}}",
|
|
"apihelp-echomarkseen-summary": "{{doc-apihelp-summary|echomarkseen}}",
|
|
"apihelp-echomarkseen-example-1": "{{doc-apihelp-example|echomarkseen}}",
|
|
"apihelp-echomarkseen-param-type": "{{doc-apihelp-param|echomarkseen|type}}",
|
|
"apihelp-echomarkseen-param-timestampFormat": "{{doc-apihelp-param|echomarkseen|timestampFormat}}",
|
|
"apihelp-echomute-description": "{{doc-apihelp-description|echomute}}",
|
|
"apihelp-echomute-summary": "{{doc-apihelp-summary|echomute}}",
|
|
"apihelp-echomute-param-type": "{{doc-apihelp-param|echomute|type}}",
|
|
"apihelp-echomute-param-mute": "{{doc-apihelp-param|echomute|mute}}",
|
|
"apihelp-echomute-param-unmute": "{{doc-apihelp-param|echomute|unmute}}",
|
|
"apihelp-echopushsubscriptions-summary": "{{doc-apihelp-summary|echopushsubscriptions}}",
|
|
"apihelp-echopushsubscriptions-param-command": "{{doc-apihelp-param|echopushsubscriptions|command}}",
|
|
"apihelp-echopushsubscriptions+create-summary": "{{doc-apihelp-summary|echopushsubscriptions+create}}",
|
|
"apihelp-echopushsubscriptions+create-param-provider": "{{doc-apihelp-param|echopushsubscriptions+create|provider}}",
|
|
"apihelp-echopushsubscriptions+create-param-providertoken": "{{doc-apihelp-param|echopushsubscriptions+create|providertoken}}",
|
|
"apihelp-echopushsubscriptions+create-example": "{{doc-apihelp-example|echopushsubscriptions+create}}",
|
|
"apihelp-echopushsubscriptions+delete-summary": "{{doc-apihelp-summary|echopushsubscriptions+delete}}",
|
|
"apihelp-echopushsubscriptions+delete-param-providertoken": "{{doc-apihelp-param|echopushsubscriptions+delete|providertoken}}",
|
|
"apihelp-echopushsubscriptions+delete-example": "{{doc-apihelp-example|echopushsubscriptions+delete}}",
|
|
"apihelp-query+notifications-description": "{{doc-apihelp-description|query+notifications}}",
|
|
"apihelp-query+notifications-summary": "{{doc-apihelp-summary|query+notifications}}",
|
|
"apihelp-query+notifications-param-prop": "{{doc-apihelp-param|query+notifications|prop}}",
|
|
"apihelp-query+notifications-param-sections": "{{doc-apihelp-param|query+notifications|sections}}",
|
|
"apihelp-query+notifications-param-groupbysection": "{{doc-apihelp-param|query+notifications|groupbysection}}",
|
|
"apihelp-query+notifications-param-filter": "{{doc-apihelp-param|query+notifications|filter}}",
|
|
"apihelp-query+notifications-param-format": "{{doc-apihelp-param|query+notifications|format}}",
|
|
"apihelp-query+notifications-paramvalue-format-model": "{{doc-apihelp-paramvalue|query+notifications|format|model}}",
|
|
"apihelp-query+notifications-paramvalue-format-special": "{{doc-apihelp-paramvalue|query+notifications|format|special}}",
|
|
"apihelp-query+notifications-paramvalue-format-flyout": "{{doc-apihelp-paramvalue|query+notifications|format|flyout}}\n{{doc-important|You can translate the word \"Deprecated\", but please do not alter the <code><nowiki>class=\"apihelp-deprecated\"</nowiki></code> attribute}}",
|
|
"apihelp-query+notifications-paramvalue-format-html": "{{doc-apihelp-paramvalue|query+notifications|format|html}}\n{{doc-important|You can translate the word \"Deprecated\", but please do not alter the <code><nowiki>class=\"apihelp-deprecated\"</nowiki></code> attribute}}",
|
|
"apihelp-query+notifications-param-limit": "{{doc-apihelp-param|query+notifications|limit}}",
|
|
"apihelp-query+notifications-param-wikis": "{{doc-apihelp-param|query+notifications|wikis}}",
|
|
"apihelp-query+notifications-param-crosswikisummary": "{{doc-apihelp-param|query+notifications|crosswikisummary}}",
|
|
"apihelp-query+notifications-param-alertcontinue": "{{doc-apihelp-param|query+notifications|alertcontinue}}",
|
|
"apihelp-query+notifications-param-unreadfirst": "{{doc-apihelp-param|query+notifications|unreadfirst}}",
|
|
"apihelp-query+notifications-param-alertunreadfirst": "{{doc-apihelp-param|query+notifications|alertunreadfirst}}",
|
|
"apihelp-query+notifications-param-messagecontinue": "{{doc-apihelp-param|query+notifications|messagecontinue}}",
|
|
"apihelp-query+notifications-param-messageunreadfirst": "{{doc-apihelp-param|query+notifications|messageunreadfirst}}",
|
|
"apihelp-query+notifications-param-titles": "{{doc-apihelp-param|query+notifications|titles}}",
|
|
"apihelp-query+notifications-param-bundle": "{{doc-apihelp-param|query+notifications|bundle}}",
|
|
"apihelp-query+notifications-example-1": "{{doc-apihelp-example|query+notifications}}",
|
|
"apihelp-query+notifications-example-2": "{{doc-apihelp-example|query+notifications}}",
|
|
"apihelp-query+unreadnotificationpages-description": "{{doc-apihelp-description|query+unreadnotificationpages}}",
|
|
"apihelp-query+unreadnotificationpages-summary": "{{doc-apihelp-summary|query+unreadnotificationpages}}",
|
|
"apihelp-query+unreadnotificationpages-param-grouppages": "{{doc-apihelp-param|query+unreadnotificationpages|grouppages}}",
|
|
"apihelp-query+unreadnotificationpages-param-limit": "{{doc-apihelp-param|query+unreadnotificationpages|limit}}",
|
|
"apihelp-query+unreadnotificationpages-param-wikis": "{{doc-apihelp-param|query+unreadnotificationpages|wikis}}",
|
|
"apihelp-query+unreadnotificationpages-example-1": "{{doc-apihelp-example|query+unreadnotificationpages}}",
|
|
"apihelp-echoarticlereminder-summary": "{{doc-apihelp-summary|echoarticlereminder}}",
|
|
"apihelp-echoarticlereminder-param-pageid": "{{doc-apihelp-param|echoarticlereminder|pageid}}",
|
|
"apihelp-echoarticlereminder-param-title": "{{doc-apihelp-param|echoarticlereminder|title}}",
|
|
"apihelp-echoarticlereminder-param-timestamp": "{{doc-apihelp-param|echoarticlereminder|timestamp}}",
|
|
"apihelp-echoarticlereminder-param-comment": "{{doc-apihelp-param|echoarticlereminder|comment}}",
|
|
"apihelp-echoarticlereminder-example-1": "{{doc-apihelp-example|echoarticlereminder}}",
|
|
"apihelp-echoarticlereminder-example-2": "{{doc-apihelp-example|echoarticlereminder}}",
|
|
"apiwarn-echo-deprecation-timestampformat": "{{doc-apierror}}",
|
|
"apiwarn-echo-deprecation-flyout": "{{doc-apierror}}",
|
|
"apiwarn-echo-deprecation-html": "{{doc-apierror}}",
|
|
"apierror-echo-event-creation-failed": "{{doc-apierror}}",
|
|
"apierror-echo-push-token-exists": "{{doc-apierror}}",
|
|
"apierror-echo-push-token-not-found": "{{doc-apierror}}"
|
|
}
|