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:
parent
5049cbf236
commit
a462697b30
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user