feat(feedback): snapshot the sender's language and connector bot at submit
Store the sender's interface language (lang) and, for a message that arrived through an external connector (Telegram), the bot language (channel_lang) on the feedback row at submit time, so the operator console shows the state as it was rather than the account's current settings (same snapshot discipline as a suspension reason). Added additively in migration 00005. The console detail reads these columns instead of loading the account live.
This commit is contained in:
@@ -15,7 +15,8 @@ SET search_path = backend, pg_catalog;
|
||||
-- attachment is the raw bytes (capped at 1,000,000 in Go); attachment_name carries the original
|
||||
-- file name (its extension drives the safe content-type at serve time). sender_ip is the
|
||||
-- gateway-forwarded client IP (validated, like chat); channel is the submitting platform
|
||||
-- (telegram/ios/android/web, validated in Go).
|
||||
-- (telegram/ios/android/web, validated in Go). The sender's interface/bot language snapshots
|
||||
-- (lang, channel_lang) are added additively in 00005.
|
||||
CREATE TABLE feedback_messages (
|
||||
message_id uuid PRIMARY KEY,
|
||||
account_id uuid NOT NULL REFERENCES accounts (account_id) ON DELETE CASCADE,
|
||||
|
||||
Reference in New Issue
Block a user