summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-05-28 17:13:19 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:28 +0200
commitbbce8c3ea1c73726f233961fe7bdb16b8a08bb67 (patch)
treee3f345e7e2e6f5d21947013331af1f83593fb20a /apps/federatedfilesharing
parentdaba042d269bfd701c78e014c0ad7794975d2133 (diff)
downloadnextcloud-server-bbce8c3ea1c73726f233961fe7bdb16b8a08bb67.tar.gz
nextcloud-server-bbce8c3ea1c73726f233961fe7bdb16b8a08bb67.zip
adjust to latest api version
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php2
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php2
-rw-r--r--apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php9
3 files changed, 7 insertions, 6 deletions
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index 2d0a3c528fb..e2cc050d879 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -170,7 +170,7 @@ class RequestHandlerController extends OCSController {
$owner,
$sharedByFederatedId,
$sharedBy,
- ['name' => 'webdav', 'options' => ['access_token' => $token]],
+ $token,
'user',
'file'
);
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 65151e34135..e0f8735f900 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -379,7 +379,7 @@ class Notifications {
$fields['owner'],
$fields['sharedByFederatedId'],
$fields['sharedBy'],
- ['name' => 'webdav', 'options' => ['access_token' => $fields['token'], 'permissions' => ['read', 'write', 'share']]],
+ $fields['token'],
'user',
'file'
);
diff --git a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
index 6c5b63b1cd2..e7f6f1b9194 100644
--- a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
@@ -135,7 +135,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
list($ownerUid, $remote) = $this->addressHandler->splitUserRemote($share->getOwner());
$remote = $remote;
- $token = isset($protocol['options']['access_token']) ? $protocol['options']['access_token'] : null;
+ $token = $share->getShareSecret();
$name = $share->getResourceName();
$owner = $share->getOwnerDisplayName();
$sharedBy = $share->getSharedByDisplayName();
@@ -234,21 +234,22 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
* notification received from another server
*
* @param string $notificationType (e.g. SHARE_ACCEPTED)
- * @param array $message
+ * @param string $providerId id of the share
+ * @param array $notification payload of the notification
*
* @throws ShareNotFoundException
* @throws ActionNotSupportedException
*
* @since 14.0.0
*/
- public function notificationReceived($notificationType, array $message) {
+ public function notificationReceived($notificationType, $providerId, array $notification) {
switch ($notificationType) {
case 'SHARE_ACCEPTED' :
return;
}
- throw new ActionNotSupportedException($notificationType);
+ throw new ActionNotSupportedException($notification);
}
/**