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
This commit is contained in:
parent
1463bce24c
commit
2c9becec10
|
|
@ -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…
Reference in New Issue