From 046f46ce8d34f8f3845be590398d43c5791d43df Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Wed, 29 Jul 2026 08:18:56 +0200 Subject: [PATCH] fix: make the runtime store authoritative for the announcement Always reflect the stored announcement in config.json: expose it while live and clear it otherwise. A disabled announcement now clears the config output instead of falling back to a statically configured one, which removes the precedence ambiguity raised in review. --- services/web/pkg/service/v0/service.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/services/web/pkg/service/v0/service.go b/services/web/pkg/service/v0/service.go index 4f2cbd984f..190b601c73 100644 --- a/services/web/pkg/service/v0/service.go +++ b/services/web/pkg/service/v0/service.go @@ -156,11 +156,9 @@ func (p Web) getPayload() (payload []byte, err error) { // ensure that the server url has a trailing slash webConfig.Server = strings.TrimRight(webConfig.Server, "/") + "/" - // inject the runtime managed announcement banner; keep a statically configured one - // (web.config.options.announcement) when nothing is stored - if a := p.currentAnnouncement(); a != nil { - webConfig.Options.Announcement = a - } + // the runtime store is authoritative for the announcement banner: expose it when live, + // clear it otherwise + webConfig.Options.Announcement = p.currentAnnouncement() return json.Marshal(webConfig) }