Skip to content

Commit ebf35fb

Browse files
committed
Correctly check the reception of a remote feedback
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent 745543d commit ebf35fb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

apps/federatedfilesharing/lib/Notifications.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ protected function tryLegacyEndPoint($remoteDomain, $urlSuffix, array $fields) {
405405
* @param $fields
406406
* @param $action
407407
*
408-
* @return bool
408+
* @return array|false
409409
*/
410410
protected function tryOCMEndPoint($remoteDomain, $fields, $action) {
411411
switch ($action) {

apps/files_sharing/lib/External/Manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public function processNotification($remoteShare) {
365365
private function sendFeedbackToRemote($remote, $token, $remoteId, $feedback) {
366366
$result = $this->tryOCMEndPoint($remote, $token, $remoteId, $feedback);
367367

368-
if ($result === true) {
368+
if (is_array($result)) {
369369
return true;
370370
}
371371

@@ -401,7 +401,7 @@ private function sendFeedbackToRemote($remote, $token, $remoteId, $feedback) {
401401
* @param string $token
402402
* @param string $remoteId id of the share
403403
* @param string $feedback
404-
* @return bool
404+
* @return array|false
405405
*/
406406
protected function tryOCMEndPoint($remoteDomain, $token, $remoteId, $feedback) {
407407
switch ($feedback) {

lib/private/Federation/CloudFederationProviderManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function sendShare(ICloudFederationShare $share) {
167167
/**
168168
* @param string $url
169169
* @param ICloudFederationNotification $notification
170-
* @return mixed
170+
* @return array|false
171171
*/
172172
public function sendNotification($url, ICloudFederationNotification $notification) {
173173
$ocmEndPoint = $this->getOCMEndPoint($url);

lib/public/Federation/ICloudFederationProviderManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function sendShare(ICloudFederationShare $share);
8989
*
9090
* @param string $url
9191
* @param ICloudFederationNotification $notification
92-
* @return mixed
92+
* @return array|false
9393
*
9494
* @since 14.0.0
9595
*/

0 commit comments

Comments
 (0)