1
0

fix(notifications): only add project subscription as task subscription when the user is not already subscribed to the task

Before this fix, a project subscription object was added twice to the list of subscriptions for a task when the user did not subscribe to the task directly. This caused the user to receive a comment notification twice for a given task.
This was probably a regression from efde364224.

Resolves https://community.vikunja.io/t/e-mail-notification-twice/2740/18

(cherry picked from commit 2c9becec101c14dd744444fffe244510e8394323)
This commit is contained in:
kolaente 2024-09-02 23:34:45 +02:00
parent 5049cbf236
commit a462697b30
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -259,7 +259,7 @@ func GetSubscriptions(s *xorm.Session, entityType SubscriptionEntityType, entity
delete(subs, task.ID)
}
if !hasTaskSub {
if !hasTaskSub && !hasProjectSub {
subs[task.ID] = psub
}
}