-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(files_sharing): skip expiration notify for invalid share record #50542
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only seems to happen if you manually call this command. I think this only addresses one part of the original issue.
There seems to be also an activity message at the actual expiration that may then be sent by mail: https://github.com/nextcloud/activity/blob/b2d16c9b996b5c70488c932b25ddd7d83246ec6f/lib/FilesHooks.php#L859
However I'm unsure which notification the original report is referring to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change makes sense nevertheless 👍
@juliusknorr @nickvergessen After checking the flow, I would suggest to update function |
|
As long as we not generally skip emitting the event. It might still be useful even for invalid shares to be emitted on removal (e.g. for the audit log). Not entirely sure what is best there. Any further insight @nickvergessen or @artonge for sharing in general? |
|
At least completely skipping the hooks is not a good/valid idea. I had raised the question what the actual problem we are trying to fix is, but we don't have a screenshot/video so it's a bit of blind guessing. server/apps/files_sharing/lib/Activity/Providers/PublicLinks.php Lines 29 to 38 in 1e04619
which is expected. It could be adjusted in https://github.com/nextcloud/activity/blob/af19269515991ea4e9863606b2b9211ccda9176d/lib/FilesHooks.php#L967-L981 When discussing this a bit, @luka-nextcloud said
The problem is, the file might still exist, just not for you. And maybe it was not intentional, so it would be good to inform you that something you shared is no longer working :/ |
|
@nickvergessen @juliusknorr I just confirmed with the customer that the notification email originates from the Activity app. |
|
Sounds good, lets do it like this then. |
|
PR on activity app: nextcloud/activity#1915 |
Signed-off-by: Luka Trovic <luka@nextcloud.com>
6343839 to
d7f885b
Compare
|
/backport to stable29 |
|
/backport to stable30 |
|
/backport to stable31 |
Summary
When the share is expired and the file is no longer present, the expiration notification should be skipped.
Checklist