@@ 322-327 (lines=6) @@ | ||
319 | } |
|
320 | // TODO: check permissions/preconditions in all cases |
|
321 | switch ($notificationType) { |
|
322 | case FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED: |
|
323 | $share = $this->getValidShare( |
|
324 | $providerId, $notification['sharedSecret'] |
|
325 | ); |
|
326 | $this->fedShareManager->acceptShare($share); |
|
327 | break; |
|
328 | case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED: |
|
329 | $share = $this->getValidShare( |
|
330 | $providerId, $notification['sharedSecret'] |
|
@@ 328-333 (lines=6) @@ | ||
325 | ); |
|
326 | $this->fedShareManager->acceptShare($share); |
|
327 | break; |
|
328 | case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED: |
|
329 | $share = $this->getValidShare( |
|
330 | $providerId, $notification['sharedSecret'] |
|
331 | ); |
|
332 | $this->fedShareManager->declineShare($share); |
|
333 | break; |
|
334 | case FileNotification::NOTIFICATION_TYPE_REQUEST_RESHARE: |
|
335 | $shareWithAddress = new Address($notification['shareWith']); |
|
336 | $localShareWith = $shareWithAddress->getUserId(); |
|
@@ 358-363 (lines=6) @@ | ||
355 | $providerId, $notification['sharedSecret'] |
|
356 | ); |
|
357 | break; |
|
358 | case FileNotification::NOTIFICATION_TYPE_RESHARE_UNDO: |
|
359 | $share = $this->getValidShare( |
|
360 | $providerId, $notification['sharedSecret'] |
|
361 | ); |
|
362 | $this->fedShareManager->revoke($share); |
|
363 | break; |
|
364 | default: |
|
365 | return new JSONResponse( |
|
366 | ['message' => "Notification of type {$notificationType} is not supported"], |