1
0

fix(reminders): make sure reminders are only sent once per user

Previously, when a user was creator and assigned to a task, they would get two reminder notifications for the same task. This was caused by Vikunja first fetching all creators and then all assignees and not removing duplicates from that list.

Related: https://community.vikunja.io/t/duplicate-email-reminders/1505/3
This commit is contained in:
kolaente
2023-08-24 10:47:17 +02:00
parent 5e8084c194
commit 1b9c4204a8
2 changed files with 14 additions and 1 deletions

View File

@ -30,7 +30,7 @@ func TestReminderGetTasksInTheNextMinute(t *testing.T) {
s := db.NewSession()
defer s.Close()
now, err := time.Parse(time.RFC3339Nano, "2018-12-01T01:13:00Z")
now, err := time.Parse(time.RFC3339Nano, "2018-12-01T01:12:00Z")
assert.NoError(t, err)
notifications, err := getTasksWithRemindersDueAndTheirUsers(s, now)
assert.NoError(t, err)