Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly check the reception of a remote feedback #27430

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/federatedfilesharing/lib/Notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ protected function tryLegacyEndPoint($remoteDomain, $urlSuffix, array $fields) {
* @param $fields
* @param $action
*
* @return bool
* @return array|false
*/
protected function tryOCMEndPoint($remoteDomain, $fields, $action) {
switch ($action) {
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/lib/External/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public function processNotification($remoteShare) {
private function sendFeedbackToRemote($remote, $token, $remoteId, $feedback) {
$result = $this->tryOCMEndPoint($remote, $token, $remoteId, $feedback);

if ($result === true) {
if (is_array($result)) {
return true;
}

Expand Down Expand Up @@ -401,7 +401,7 @@ private function sendFeedbackToRemote($remote, $token, $remoteId, $feedback) {
* @param string $token
* @param string $remoteId id of the share
* @param string $feedback
* @return bool
* @return array|false
*/
protected function tryOCMEndPoint($remoteDomain, $token, $remoteId, $feedback) {
switch ($feedback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function sendShare(ICloudFederationShare $share) {
/**
* @param string $url
* @param ICloudFederationNotification $notification
* @return mixed
* @return array|false
*/
public function sendNotification($url, ICloudFederationNotification $notification) {
$ocmEndPoint = $this->getOCMEndPoint($url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function sendShare(ICloudFederationShare $share);
*
* @param string $url
* @param ICloudFederationNotification $notification
* @return mixed
* @return array|false
*
* @since 14.0.0
*/
Expand Down