-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(sharing): send share emails for internal users too #49898
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Anna Larch <[email protected]>
According to the docks the system config is about emails for new incoming shares. I don't think this is the right place to disable that? It should be set on the share, but rather when the incoming share is added and the email should be sent. I can't make sense of the config and your change, maybe you can explain it in more depth to help me understand it. |
For the context: change of default beaviour for sending email about the share was introduced here: #48381
Could be done in this palce? server/apps/files_sharing/lib/Controller/ShareAPIController.php Lines 675 to 682 in e2d2a17
|
Sure thing. Due to the changes in the frontend, the sendMail param is not always set. I know the config option is a bit weird but it exists. This PR is not a fix for the missing value in the frontend, but it restores the previous behaviour from before 30.0.2, where mails were sent while still handling |
Thanks @miaulalala for taking care 🙏 This issue was also brought to my attention last week. In Nextcloud 29, creating a new user share triggers a new share notification as expected. However, this behavior no longer works in Nextcloud 30.0.4. As mentioned before, this seems to be related to the mailSend parameter. In Nextcloud 29, the create share response shows 1, whereas in Nextcloud 30, it shows 0. Especially on configurations with 29 Screencast.From.2024-12-21.16-43-49.webm30 Screencast.From.2024-12-21.16-44-15.webm |
It is confusing that there are two different ways to inform a user about a new share. This PR specifically targets the notification sent by the sharebymail app. However, the screenshot provided refers to the configuration for the activity app. The notification from the sharebymail app is sent immediately, while the activity notification offers more flexibility—for example, sending notifications once per day or only via push. I'm unsure about Maksim's idea to respect the configuration from the activity app within the sharebymail app. |
I checked the behaviour with Joas, activity app settings should have nothing to do with current issue. So forget my suggestion 🙄 |
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.
One inline comment.
Is it possible to expect this fix for version 30.0.5? |
There were some requests to have some kind of control over this and flagging this from the frontend as such : #50064 works but the user has explicitly activated the toggle. |
Summary
Based on the config example, sending emails for shares defaults to true.
Currently, when the frontend doesn't provide a value we break this for internal users and only send emails for external shares.
If there is no value provided from the frontend, this PR now checks the config option, and determines if the type is an internal share type or an external share via email (
TYPE_EMAIL
).For external shares, the share email is sent regardless of the config option.
TODO
Checklist