Fall back to spec retention defaults before the global default

GetRetentionDays previously dropped straight from a missing user
override to RetentionDefaultDays, so every channel showed 30 days
in the UI even though the spec lists 365 for Tells and 90 for own-
conversation channels. Insert a middle layer: user override → spec
default → global default. The retention sweep now seeds its policy
from PrivacyDefaults.DefaultRetentionDays first and lets explicit
user overrides win on top, and the per-channel UI tags each row as
[override], [spec], or [global] so the source of the value is
visible without guessing.
This commit is contained in:
2026-05-01 18:52:54 +02:00
parent 68c7185cea
commit 353596fa43
3 changed files with 16 additions and 3 deletions
+2
View File
@@ -66,6 +66,8 @@ public class Configuration : IPluginConfiguration
{
if (RetentionPerChannelDays.TryGetValue(type, out var userOverride))
return userOverride;
if (Privacy.PrivacyDefaults.DefaultRetentionDays.TryGetValue(type, out var specDefault))
return specDefault;
return RetentionDefaultDays;
}