fix(federation): Fall back to old version flag

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-12-09 16:15:50 +01:00
parent f1e2970040
commit 75c16a722b
No known key found for this signature in database
GPG key ID: F72FA5B49FFA96B0

View file

@ -172,7 +172,8 @@ class OCMProvider implements IOCMProvider {
*/
public function import(array $data): static {
$this->setEnabled(is_bool($data['enabled'] ?? '') ? $data['enabled'] : false)
->setApiVersion((string)($data['version'] ?? ''))
// Fall back to old apiVersion for Nextcloud 30 compatibility
->setApiVersion((string)($data['version'] ?? $data['apiVersion'] ?? ''))
->setEndPoint($data['endPoint'] ?? '');
$resources = [];