hub (unreleased): the notice's texts — what to do if the household did not ask for it; the subject names the deletion and its day (decision 316, R-1374)

Household-facing, built and NOT published: the operator reads them before a release.

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-15 16:22:11 +01:00
1 parent 42ef25c23b
commit 9ef8cee1c4
13 files changed
+74 -17

No files matched your search

+3 -3
View File
@@ -162,11 +162,11 @@ func TestNotice_AReportNamesAnApp_TheHubMailsTheHouseholdOncePerPress(t *testing
t.Fatalf("the household got %d notice(s) after the first report that names the app, want 1: %+v", len(got), r.all())
}
hubDay := time.Now().Add(offsitekeys.EndedAppAfter)
if !strings.Contains(got[0].subject, "vikunja: ") || strings.Contains(got[0].subject+got[0].body, "1999") {
if !strings.Contains(got[0].subject, "vikunja: a távoli másolatok törlésének napja: ") || strings.Contains(got[0].subject+got[0].body, "1999") {
t.Fatalf("the notice must name the app and the HUB's day, never the box's ends_at:\n%s\n%s", got[0].subject, got[0].body)
}
if y := fmt.Sprintf("Törlésük napja: %d.", hubDay.Year()); !strings.Contains(got[0].body, y) {
t.Fatalf("the mail's day is not the hub's clock + 30 days (%s): %s", y, got[0].body)
if y := fmt.Sprintf("%d.", hubDay.Year()); !strings.Contains(got[0].subject, y) {
t.Fatalf("the subject's day is not the hub's clock + 30 days (%s): %s", y, got[0].subject)
}
n, ok := r.notice("vikunja")
if !ok || n.ToldTo != store.EndNoticeHousehold || n.ToldAt.Before(before) || n.ToldAt.After(time.Now().Add(time.Second)) {