nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.2k stars 273 forks source link

Notifications to be received only upon mentions or comments made by other users #4304

Open earendil1 opened 1 year ago

earendil1 commented 1 year ago
### Steps to reproduce 1. In personal notifications I check Mail: - [x] comments for files, - [x] a comment has been created on a card. 4. When I make a comments to a file or I create a comment on a card 5. I get the email notification ### Expected behaviour Notifications are ways to make me aware of what is relevant to me. So I would expect to be able to limit notifications to: - [ ] Most importantly: - mentions to me by other users on the ticked elements in the notifications setting - [ ] Secondly: comments of other users on shared Deck cards or files. Activities in the Dashboard could reflect such a behavior, (or a dedicated widget). This would make notifications a lot more relevant. ### Actual behavior I get notifications both for comments and changes made by me and for those made by other members. ### Server configuration

Operating system: Linux 5.4.0-124-generic nextcloud/notifications#140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64

Web server: Hetzner Storage share

Database: nginx/1.18.0 (fpm-fcgi)

PHP version: 8.0.25

Nextcloud version: (see Nextcloud admin page) 24.0.7

Where did you install Nextcloud from: Hetzner Storage share

Signing status:

Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

Enabled:
 - accessibility: 1.10.0
 - activity: 2.16.0
 - breezedark: 24.0.2
 - calendar: 3.5.2
 - circles: 24.0.1
 - cloud_federation_api: 1.7.0
 - comments: 1.14.0
 - contactsinteraction: 1.5.0
 - dashboard: 7.4.0
 - dav: 1.22.0
 - deck: 1.7.3
 - federatedfilesharing: 1.14.0
 - federation: 1.14.0
 - files: 1.19.0
 - files_automatedtagging: 1.14.0
 - files_pdfviewer: 2.5.0
 - files_rightclick: 1.3.0
 - files_sharing: 1.16.2
 - files_trashbin: 1.14.0
 - files_versions: 1.17.0
 - files_videoplayer: 1.13.0
 - firstrunwizard: 2.13.0
 - flow_notifications: 1.4.0
 - groupfolders: 12.0.2
 - jitsi: 0.15.0
 - logreader: 2.9.0
 - lookup_server_connector: 1.12.0
 - nextcloud_announcements: 1.13.0
 - notifications: 2.12.1
 - notify_push: 0.5.0
 - oauth2: 1.12.0
 - password_policy: 1.14.0
 - photos: 1.6.0
 - privacy: 1.8.0
 - provisioning_api: 1.14.0
 - recommendations: 1.3.0
 - serverinfo_hetzner: 1.16.0
 - settings: 1.6.0
 - sharebymail: 1.14.0
 - spreed: 14.0.6
 - support: 1.7.0
 - survey_client: 1.12.0
 - systemtags: 1.14.0
 - text: 3.5.1
 - theming: 1.15.0
 - twofactor_backupcodes: 1.13.0
 - updatenotification: 1.14.0
 - user_status: 1.4.0
 - viewer: 1.8.0
 - weather_status: 1.4.0
 - workflowengine: 2.6.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - user_ldap

Nextcloud configuration:

{
    "skeletondirectory": "\/var\/www\/html\/themes\/hetzner\/skeleton",
    "simpleSignUpLink.shown": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "appstoreurl": "https:\/\/apps.your-storageshare.de",
    "apps_paths": [
        {
            "path": "\/var\/www\/html\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/www\/html\/custom_apps",
            "url": "\/custom_apps",
            "writable": true
        }
    ],
    "files_external_allow_create_new_local": false,
    "loglevel": 2,
    "log_type": "syslog",
    "updatechecker": false,
    "updater.server.url": "https:\/\/updates.your-storageshare.de",
    "updater.release.channel": "stable",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "nx30641.your-storageshare.de",
        "nextcloud.balthasarspeyr.org"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "24.0.7.1",
    "overwrite.cli.url": "https:\/\/nx30641.your-storageshare.de",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "default_language": "en",
    "default_locale": "en",
    "default_phone_region": "US",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "syslog_tag": "nextcloud-nx30641",
    "upgrade.disable-web": true,
    "theme": "hetzner",
    "templatedirectory": "\/var\/www\/html\/core\/skeleton\/Templates\/",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\Krita",
        "OC\\Preview\\HEIC"
    ],
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": "6379",
        "timeout": "1.5",
        "dbindex": "0"
    },
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "maintenance": false
}

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Operating system: Mac mini m1 Monterey

Logs

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
nickvergessen commented 1 year ago

Can you share a screenshot of the notification? There are different emails being sent from different parts and I want to make sure it's the one from this app

earendil1 commented 1 year ago

Hi @nickvergessen thanks! Sure: here is the screenshot. I hope it is what you're looking for: Schermata 2022-12-09 alle 13 06 10

nickvergessen commented 1 year ago

Okay, that is from the activity email: https://github.com/nextcloud/deck/blob/5669bd73cc6d735984c1afac1ab189f21bbfc082/lib/Activity/ActivityManager.php#L239

Might be caused by this bug then: https://github.com/nextcloud/deck/issues/4303

nickvergessen commented 1 year ago

Moving to deck nevertheless so they can filter out if above issue solves it or not.

nicnab commented 1 year ago

I hope I'm not hijacking this issue but I have one small addition: maybe it would even make sense to be able to restrict notifications to all cards assigned to me or being assigned to me. I have a Nextcloud instance here that makes heavy use of Deck boards and because many boards are shared with me, I get bombarded with notifications that are irrelevant to me. I didn't find an issue specific to that request - should I rather open a new one? Thanks!

SergeyMosin commented 1 year ago

Own comments notifications are sent because of this author override: https://github.com/nextcloud/deck/blob/1901c986fff8f8ff64253544eb1b1293fac46370/lib/Activity/ActivityManager.php#L435-L440

which breaks this check here: https://github.com/nextcloud/activity/blob/8cb1ca1bb9c1d32f2f447d46f0014c7bc44c4d20/lib/NotificationGenerator.php#L56-L57

it also causes wrong value for $ownActivity to be set here: https://github.com/nextcloud/deck/blob/1901c986fff8f8ff64253544eb1b1293fac46370/lib/Activity/DeckProvider.php#L89

The // Get rid of this once the frontend fetches comments/activity individually comment is about 4 years old according to git blame so may be it is time to Get rid of the author override ?