From 8d2ff1e5b1abf6b25c3991fd2b211e12a36359ce Mon Sep 17 00:00:00 2001 From: Robi9 Date: Tue, 21 May 2024 18:41:03 -0300 Subject: [PATCH] Replace TextLanguage with Locale --- core/handlers/msg_created.go | 2 +- core/models/msgs.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/handlers/msg_created.go b/core/handlers/msg_created.go index 8677ecee0..354394485 100644 --- a/core/handlers/msg_created.go +++ b/core/handlers/msg_created.go @@ -102,7 +102,7 @@ func handleMsgCreated(ctx context.Context, rt *runtime.Runtime, tx *sqlx.Tx, oa languageCode = "" } - event.Msg.TextLanguage = envs.Language(languageCode) + event.Msg.Locale_ = envs.Locale(languageCode) } } } diff --git a/core/models/msgs.go b/core/models/msgs.go index 68325b223..5e6b3ffd4 100644 --- a/core/models/msgs.go +++ b/core/models/msgs.go @@ -439,8 +439,8 @@ func buildMsgMetadata(m *flows.MsgOut) map[string]interface{} { if m.Topic() != flows.NilMsgTopic { metadata["topic"] = string(m.Topic()) } - if m.TextLanguage != "" { - metadata["text_language"] = m.TextLanguage + if m.Locale() != "" { + metadata["locale"] = m.Locale_ } return metadata }