Adventure news: fix posting gates, digest counts, and section gating
- Don't post adventure beats when posting.enabled=false (PostNow ignores the flag) - Keep the adventure channel out of the round-robin rotation so it can't steal bulletins from the digest - no_push now retires a fact against the digest, not just the live post - Default a missing occurred_at to now instead of the Unix epoch - Keep protocol-relative image URLs on the guarded thumbnailer - Make digest_hour=0 (midnight UTC) settable - Quote the true window total in the digest, not the truncated slice - Hide the Adventure section entirely when it's disabled
This commit is contained in:
@@ -69,8 +69,10 @@ func thumbURL(src string) string {
|
||||
}
|
||||
// Root-relative sources are our own local assets (e.g. the adventure
|
||||
// emblems) — serve them directly; the thumbnailer only handles remote
|
||||
// http(s) images and would 404 a local path.
|
||||
if strings.HasPrefix(src, "/") {
|
||||
// http(s) images and would 404 a local path. "//host/x.jpg" is NOT local:
|
||||
// it's a protocol-relative remote image, and it has to keep going through
|
||||
// the guarded thumbnailer like any other third-party URL.
|
||||
if strings.HasPrefix(src, "/") && !strings.HasPrefix(src, "//") {
|
||||
return src
|
||||
}
|
||||
return "/img/" + thumbKey(src) + ".avif?u=" + url.QueryEscape(src)
|
||||
|
||||
Reference in New Issue
Block a user