UP-NextPush / server-app

UnifiedPush provider for Nextcloud - server application - Moved to https://codeberg.org/NextPush/uppush
GNU Affero General Public License v3.0
67 stars 8 forks source link

Use capabilities instead of check endpoint #42

Closed provokateurin closed 1 month ago

provokateurin commented 1 year ago

Clients can currently detect if the app is installed via the check endpoint. That is an unusual pattern and apps should instead expose capabilities to let clients know that they are available. Please consider exposing a capability and deprecating and eventually removing the check endpoint.

p1gp1g commented 1 year ago

Do you have an example of a nextcloud app doing it ?

provokateurin commented 1 year ago

Almost every app does it, for example https://github.com/nextcloud/server/blob/master/apps/user_status/lib/Capabilities.php

p1gp1g commented 1 year ago

And android side, what should I do ?

provokateurin commented 1 year ago

You need to query the capabilities endpoint as described here: https://github.com/nextcloud/server/blob/687d7686c19d03d7a2baceeeb0980dc30e28972b/core/openapi.json#L1207. Of course you will still have to query the check endpoint as a fallback for a while.

p1gp1g commented 1 month ago

Capabilities added: https://codeberg.org/NextPush/uppush/commit/42d385ad1866a9c2c15187f66d2c7b1db147a395