X Tutup
Skip to content

Do not dispatch event for non existing shares#36759

Merged
VicDeo merged 1 commit intomasterfrom
bugfix/decline-found-shares-only
Jan 22, 2020
Merged

Do not dispatch event for non existing shares#36759
VicDeo merged 1 commit intomasterfrom
bugfix/decline-found-shares-only

Conversation

@VicDeo
Copy link
Member

@VicDeo VicDeo commented Jan 14, 2020

Description

fetch returns false when the share does not exist
we don't need to dispatch the Decline event on false

Motivation and Context

it causes sending a decline request to an empty remote server:
federatedfilesharing/lib/AppInfo/Application.php(268): OCA\FederatedFileSharing\Notifications->sendDeclineShare(NULL, NULL, NULL)

How Has This Been Tested?

An unit test.
The way of reproduction IRL is unclear.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@VicDeo VicDeo added this to the development milestone Jan 14, 2020
@VicDeo VicDeo self-assigned this Jan 14, 2020
@update-docs
Copy link

update-docs bot commented Jan 14, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@VicDeo VicDeo changed the title Do not decline unexisting shares Do not decline not existing shares Jan 14, 2020
@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #36759 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #36759      +/-   ##
============================================
+ Coverage     64.68%   64.68%   +<.01%     
- Complexity    19120    19121       +1     
============================================
  Files          1269     1269              
  Lines         74778    74779       +1     
  Branches       1320     1320              
============================================
+ Hits          48372    48373       +1     
  Misses        26018    26018              
  Partials        388      388
Flag Coverage Δ Complexity Δ
#javascript 54.12% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.85% <100%> (ø) 19121 <0> (+1) ⬆️
Impacted Files Coverage Δ Complexity Δ
apps/files_sharing/lib/External/Manager.php 90.05% <100%> (+0.05%) 33 <0> (+1) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64ee624...741d0aa. Read the comment docs.

@VicDeo VicDeo force-pushed the bugfix/decline-found-shares-only branch 3 times, most recently from 9d515ec to eb653ab Compare January 16, 2020 08:23
@VicDeo VicDeo force-pushed the bugfix/decline-found-shares-only branch from eb653ab to 741d0aa Compare January 16, 2020 09:02
@VicDeo VicDeo requested a review from micbar January 20, 2020 17:02
@VicDeo VicDeo changed the title Do not decline not existing shares Do not dispatch event for non existing shares Jan 20, 2020
@VicDeo VicDeo merged commit dfa845f into master Jan 22, 2020
@delete-merged-branch delete-merged-branch bot deleted the bugfix/decline-found-shares-only branch January 22, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup