[stable10] add activity for self unshare action #35193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
user1
,user2
)user1
touser2
user2
and unshare the file fromuser2
user2
should see this action in the activity streamTypes of changes
Checklist: