nextcloud / nextcloud/server

[Bug]: Email notification for share, even when activity settings is disabled

Open
#33,205 13 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 25-feedback bug feature: activity and notification feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.
Bug description

Similar to what was described in this ancient issue: #11216

A friend shared a folder, and I received an email.
My settings under settings/user/activity for "A file or folder has been shared" are disabled for email (and push). Hence I shouldn't have received an email. – With a link to accept the share, although I've (under settings/user/sharing) "Allow shares by default" enabled. The share got accepted automatically (or at least, it appeared in my folders without me using the accept link from the mail).

Oh, and late on my friend added a note to the share, which caused a second mail; which is unwanted as well.

Steps to reproduce
  1. Admin settings: EMail configured; Sharing via mail allowed.
  2. User1 settings (activity): disable EMail for "A file or folder has been shared"
  3. User2: share a folder (or file) by entering the Username, and selecting the user from the search results/suggestions
  4. User1 receives an Email (with a link to accept the share)
Expected behavior

No EMail, if the user (receiving a share) doesn't want EMails about this. This can get quite spammy if you receive a lot of shares.

Installation method

Official Docker image

Operating system

Other

PHP engine version

PHP 8.1

Web server

Other

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

No response

List of activated Apps
Don't have access to that right now.
Nextcloud Signing status
No errors have been found.
Nextcloud Logs

No response

Additional info

Sharing via email was just recently enabled on our instance. Hence I do not know if this bug is new. But seeing the old issue with a relatively new comment about it, makes me confident, that this isn't new.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with email configured, sharing via email enabled, and the recipient's email activity setting disabled. Trace the server's sharing and activity-notification handling for direct shares and notes. Done means no email is sent for either event when the recipient has disabled that activity notification, while sharing still works as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.