Merge pull request #4 from mschwerz/bug/notification-suffix-removal

Fix incorrect ordinal suffix in notification messages
This commit is contained in:
Mohamad Tarbin 2024-09-26 23:55:47 -04:00 committed by GitHub
commit 09043b0841
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,7 +115,7 @@ func generatePreDueNotifications(chore *chModel.Chore, users []*cModel.UserCircl
TypeID: 3,
UserID: user.ID,
TargetID: fmt.Sprint(user.ChatID),
Text: fmt.Sprintf("📢 Heads up! *%s* is due soon (on %s) and assigned to %s.", chore.Name, chore.NextDueDate.Format("January 2nd"), assignee.DisplayName),
Text: fmt.Sprintf("📢 Heads up! *%s* is due soon (on %s) and assigned to %s.", chore.Name, chore.NextDueDate, assignee.DisplayName),
}
notifications = append(notifications, notification)
@ -178,7 +178,7 @@ func generateCircleGroupNotifications(chore *chModel.Chore, mt *chModel.Notifica
CreatedAt: time.Now().UTC().Add(-time.Hour * 3),
TypeID: 3,
TargetID: fmt.Sprint(*mt.CircleGroupID),
Text: fmt.Sprintf("📢 Heads up! *%s* is due soon (on %s).", chore.Name, chore.NextDueDate.Format("January 2nd")),
Text: fmt.Sprintf("📢 Heads up! *%s* is due soon (on %s).", chore.Name, chore.NextDueDate),
})
}
if mt.Nagging {