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

[stable10] add activity for self unshare action #35193

Merged
merged 1 commit into from May 9, 2019

Conversation

karakayasemi
Copy link
Contributor

Backport of #35083

Description

This PR publishes an activity entry by listening to self unshare events.
As far as I see, current sharing activities are published in this class by the activity app: https://github.com/owncloud/activity/blob/master/lib/FilesHooks.php. However, IMHO, holding them in files_sharing app is better. So, I added this event listener on files_sharing app. Am I missing something here?

Related Issue

Motivation and Context

whenever a recipient "unshares from self" they should see an activity in their activity stream that says they did so. This would help them to find out why something disappeared from their file tree in case they don't remember doing it.

How Has This Been Tested?

Unit tests and manually with the following steps:

  • Activate activity app
  • Create two users (user1, user2)
  • Share a file from user1 to user2
  • Login with user2 and unshare the file from user2
  • user2 should see this action in the activity stream

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:

@codecov
Copy link

codecov bot commented May 9, 2019

Codecov Report

Merging #35193 into stable10 will increase coverage by 0.01%.
The diff coverage is 68.42%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #35193      +/-   ##
==============================================
+ Coverage       64.47%   64.48%   +0.01%     
- Complexity      20070    20074       +4     
==============================================
  Files            1288     1288              
  Lines           76936    76955      +19     
  Branches         1307     1307              
==============================================
+ Hits            49606    49626      +20     
+ Misses          26949    26948       -1     
  Partials          381      381
Flag Coverage Δ Complexity Δ
#javascript 53.01% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.7% <68.42%> (+0.01%) 20074 <1> (+4) ⬆️
Impacted Files Coverage Δ Complexity Δ
apps/files_sharing/lib/Activity.php 5.18% <0%> (-0.17%) 100 <0> (+3)
apps/files_sharing/lib/AppInfo/Application.php 57.69% <100%> (+7.2%) 17 <0> (ø) ⬇️
apps/files_sharing/lib/Hooks.php 100% <100%> (ø) 35 <1> (+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 c28a25b...455e801. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented May 9, 2019

Codecov Report

Merging #35193 into stable10 will increase coverage by 0.01%.
The diff coverage is 68.42%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #35193      +/-   ##
==============================================
+ Coverage       64.47%   64.48%   +0.01%     
- Complexity      20070    20074       +4     
==============================================
  Files            1288     1288              
  Lines           76936    76955      +19     
  Branches         1307     1307              
==============================================
+ Hits            49606    49626      +20     
+ Misses          26949    26948       -1     
  Partials          381      381
Flag Coverage Δ Complexity Δ
#javascript 53.01% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.7% <68.42%> (+0.01%) 20074 <1> (+4) ⬆️
Impacted Files Coverage Δ Complexity Δ
apps/files_sharing/lib/Activity.php 5.18% <0%> (-0.17%) 100 <0> (+3)
apps/files_sharing/lib/AppInfo/Application.php 57.69% <100%> (+7.2%) 17 <0> (ø) ⬇️
apps/files_sharing/lib/Hooks.php 100% <100%> (ø) 35 <1> (+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 c28a25b...455e801. Read the comment docs.

@karakayasemi karakayasemi merged commit 6b4e0e9 into stable10 May 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the backport-35083 branch May 9, 2019 13:21
@davitol davitol mentioned this pull request Sep 3, 2019
13 tasks
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants