Skip to content

feat(files_sharing): add send mail toggle #50064

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

Closed
wants to merge 3 commits into from

Conversation

nfebe
Copy link
Contributor

@nfebe nfebe commented Jan 7, 2025

Summary

For new internal shares, show the user a toggle for them configure if they want to send the share receiver a notification mail.

This is subject to whether the configured user has an email send up

Screenshots

Inactive Active
inactive-sendmail active-sendmail

TODO

  • Ensure no failure if activating toggle does not lead to errors for users without configured emails

@nfebe nfebe force-pushed the fix/49954/add-send-mail-toggle branch from f178f55 to 4372d7a Compare January 7, 2025 11:02
@nfebe nfebe marked this pull request as ready for review January 7, 2025 11:02
@skjnldsv
Copy link
Member

skjnldsv commented Jan 7, 2025

Why not put it to true straight away?

@nfebe
Copy link
Contributor Author

nfebe commented Jan 7, 2025

Why not put it to true straight away?

This sounds okay, but should not require another review cycle?

cc: @skjnldsv

@nfebe nfebe force-pushed the fix/49954/add-send-mail-toggle branch from 4372d7a to c43bbd2 Compare January 7, 2025 16:08
Copy link
Contributor Author

@nfebe nfebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

@sushifrick
Copy link

Being the customer who opened the ticket that lead to the issue #49954, this would not fix our initial problem.

Our users have to accept shares, and are used to accept the shares by the link in the mail. Like hier in a gif from our user documentation. The link in the mail directly accepts the share.

Accept shares by mail

Now the shares are listed as pending, but users do not find those. They get notifications about changes on shared folders and if they open the internal links from the notfications, they get a file not found error. No mention of the pending shares. Then they contact the support.

So i am not against the optional mails presented here in general, but would love an admin option to overrule it and enforce the mails.

Kind regards
Sascha

@nfebe
Copy link
Contributor Author

nfebe commented Jan 13, 2025

Our users have to accept shares, and are used to accept the shares by the link in the mail.

Hello @sushifrick thanks for you comment, I am afraid the issue you described is completely different from the one the linked ticket is resolving.

  • The ticket links describes a situation where shares do not trigger emails
  • The situation you described (based on the quoted statement) indicates that share links cannot be used to accept shares anymore, not the same thing.

It would be nice to check back on your ticket to make sure the right thing is being addressed.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test, but looks good.
I think for such a critical thing you should add a test that ensures the mail is sent/not sent based on the toggle input.

@sushifrick
Copy link

Dear @nfebe,

Hello @sushifrick thanks for you comment, I am afraid the issue you described is completely different from the one the linked ticket is resolving.

I do not think so. The problem is not that link in the mails do not accept the share. The problem is that the mails simply do not exist anymore right now. I have no idea, what links are in the mail and weather those links might or might not accept the share. I would hope so, as this was the state before. I am not even sure when the mails went missing, but each internal share did notify the receivers via mail before. Might be a couple of versions back, when it went missing, though.

But I want to emphasize, that this new optional email notifications are different from how it was before. Each new share triggered a (non optional) mail, even independent on the users notification settings. And that was a good thing. Users need to know about new shares. And as the admin I would like to force those mails again, or at least be able set the default to true. This is missing here.

@nfebe
Copy link
Contributor Author

nfebe commented Jan 13, 2025

Hello @sushifrick in that case #49898 solves your problem and then this PR gives the user control over the behavior in the UI.

@susnux susnux added this to the Nextcloud 32 milestone Mar 2, 2025
@nfebe nfebe force-pushed the fix/49954/add-send-mail-toggle branch from c43bbd2 to 28f62ba Compare May 14, 2025 07:47
@nfebe nfebe requested a review from a team as a code owner May 14, 2025 07:47
@nfebe nfebe requested review from sorbaugh and removed request for a team May 14, 2025 07:47
Copy link

codecov bot commented May 14, 2025

❌ We are unable to process any of the uploaded JUnit XML files. Please ensure your files are in the right format.

@nfebe nfebe force-pushed the fix/49954/add-send-mail-toggle branch from 28f62ba to 4a4cb19 Compare May 14, 2025 08:39
@nfebe nfebe requested a review from a team as a code owner May 14, 2025 08:39
@nfebe nfebe requested review from provokateurin and removed request for a team May 14, 2025 08:39
@nfebe nfebe force-pushed the fix/49954/add-send-mail-toggle branch 3 times, most recently from e7ca64a to 93c22fa Compare May 14, 2025 09:32
nfebe added 2 commits June 4, 2025 18:12
For new internal shares, show the user a toggle for them configure if they want
to send the share receiver a notification mail.

This is subject to whether the share receiver has an email attached to their account.

Signed-off-by: nfebe <[email protected]>
@nfebe nfebe force-pushed the fix/49954/add-send-mail-toggle branch from 93c22fa to 67c1683 Compare June 4, 2025 22:30
@nfebe
Copy link
Contributor Author

nfebe commented Jun 4, 2025

/compile

Signed-off-by: nextcloud-command <[email protected]>
@nextcloud-command nextcloud-command requested a review from a team as a code owner June 4, 2025 22:34
@marcoambrosini
Copy link
Member

marcoambrosini commented Jun 5, 2025

@nfebe on second thought, and since this is not in yet: I think it would be better if this was moved to the advanced settings.

@nfebe
Copy link
Contributor Author

nfebe commented Jun 5, 2025

@nfebe on second thought, and since this is not in yet: I think it would be better if this was moved to the advanced settings.

Hi @marcoambrosini thanks for the further feedback, I think it makes more sense outside.

  • A user can create a share without expanding the advanced settings section, in such a case, the can quickly toggle if they want a mail (for example if your sharing a file with another account that also belongs to you, granting access to someone who already has a link without noise).

  • We send mails by default.

So technically that is not "advanced"? What do you say?

@marcoambrosini
Copy link
Member

marcoambrosini commented Jun 5, 2025

@nfebe, can't we just remove this toggle altogether and always send the email by default? I think we can do so given that all internal users can decide which type of notifications they want to receive and disable email notifications altogether

@nfebe nfebe closed this Jun 5, 2025
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 📁 Files team Jun 5, 2025
@marcoambrosini
Copy link
Member

For the record, we discussed with @nfebe that this feature might still be valuable if the sharer could mute all notifications for the sharee. Much like what we do with talk "silent" messages and calls. But allowing control only on email notifications would be an incomplete feature.

@nfebe
Copy link
Contributor Author

nfebe commented Jun 10, 2025

As part of that discussion, I pointed out that I do not agree with this view especially from an API standpoint. The interface of the API does allow this option. This feature was never implemented in this PR which only provides the user control over this existing option.

See :

This PR is a follow up from a couple of issues including a support ticket where a customer complained about "configurations that cannot be configured."

In summary, at the moment, the share API does not have an option to suppress all notifications but does have one to suppress email.

That said, implementing "suppress all notifications" is a related but different configuration/feature from this and is not possible from the share creation interface at the moment.

I closed this PR for the sudden lack of consensus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

[Bug]: New Share to Local User Does Not Trigger Email Notification (sharebyemail)
8 participants