branding: make product identity runtime-configurable

Adopt upstream owpengram/owpengram-server's branding.Config/Configure/
Current in place of the old package-level constants. This is the piece the
earlier merge attempt was blocked on (internal/branding failed to import
during that merge). The default identity is unchanged -- every existing
ProductName/ProductUsername/... default still reads "OwpenGram" -- so this
is a pure capability add: nothing currently calls Configure, and every call
site now reads the current snapshot via a function instead of a compile-time
constant.

Five string templates that concatenated branding.ProductName into a `const`
had to become `var`, since a func call is no longer a valid const operand.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Astra 2026-09-14 11:37:36 +01:00
parent 7fef8438c5
commit 6649b70d5e
15 changed files with 224 additions and 51 deletions

View file

@ -114,7 +114,7 @@ const (
verifyChoiceBlockedPrefix = "no:"
)
const verifyBotStartText = `I collect applications for official ` + branding.ProductName + ` verification: the badge shown next to the name of a channel, supergroup or bot whose identity has been confirmed.
var verifyBotStartText = `I collect applications for official ` + branding.ProductName() + ` verification: the badge shown next to the name of a channel, supergroup or bot whose identity has been confirmed.
Before you apply, check that the subject of the application:
- is a channel, supergroup or bot with a public @username;
@ -126,7 +126,7 @@ This badge is never sold and never granted automatically. A person reads every a
Tap the button below, or send /new, to start. Send /help for the full list of commands.`
const verifyBotHelpText = `I collect official ` + branding.ProductName + ` verification applications.
var verifyBotHelpText = `I collect official ` + branding.ProductName() + ` verification applications.
/new - file a verification application
/status - list your applications and their status