diff --git a/dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs b/dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs index 0ce218de..cf05fbbb 100644 --- a/dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs +++ b/dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs @@ -349,6 +349,9 @@ public void RosterFeedFiltersFollowThePublicFeedsValueRules() Assert.Equal("full", kept["window"]!.GetValue()); Assert.Equal("hive-125125", kept["community"]!.GetValue()); Assert.Equal("s:abc.1:25", kept["cursor"]!.GetValue()); + // The 12 h band is the newest window; a gateway behind the desk would drop it silently. + var shift = Ok(CurationDeskWrites.RosterFeed, "{\"window\":\"12h\"}"); + Assert.Equal("12h", shift["window"]!.GetValue()); // Trailing newlines and non-ASCII digits are not the value either. var newline = Ok(CurationDeskWrites.RosterFeed, "{\"community\":\"hive-125125\\n\",\"cursor\":\"abc\\n\",\"view\":\"queue\\n\"}"); diff --git a/dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs b/dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs index 78bc8590..8a592b24 100644 --- a/dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs +++ b/dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs @@ -105,6 +105,7 @@ public void EnumsAcceptOnlyTheirAllowlist() Assert.Equal("curation/desk/feed?app=peakd", Feed(("app", "peakd"))); Assert.Equal("curation/desk/feed", Feed(("app", "hive"))); Assert.Equal("curation/desk/feed?window=locked", Feed(("window", "locked"))); + Assert.Equal("curation/desk/feed?window=12h", Feed(("window", "12h"))); Assert.Equal("curation/desk/feed", Feed(("window", "week"))); Assert.Equal("curation/desk/feed", Feed(("sort", "Queue"))); } diff --git a/dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs b/dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs index 04f73aad..1f677d2e 100644 --- a/dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs +++ b/dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs @@ -552,7 +552,7 @@ public static class CurationDeskQuery public static readonly IReadOnlySet Views = new HashSet { "queue", "latest", "new-authors", "recommended", "curated", "all" }; public static readonly IReadOnlySet Apps = new HashSet { "all", "ecency", "peakd", "other" }; - public static readonly IReadOnlySet Windows = new HashSet { "full", "half", "eighth", "locked", "all" }; + public static readonly IReadOnlySet Windows = new HashSet { "12h", "full", "half", "eighth", "locked", "all" }; /// /// Emission order of the feed parameters. Fixed so that the memo key and