From 25a1ca5a9f6b0f553bc865b12ca353ace845c888 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Fri, 14 Jan 2022 17:01:42 +0000 Subject: [PATCH] bots: fix language selection you may have to re-apply your language choice. --- api.go | 4 +++- discord.go | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api.go b/api.go index 24703ad..e923c0f 100644 --- a/api.go +++ b/api.go @@ -2092,7 +2092,9 @@ func (app *appContext) ModifyConfig(gc *gin.Context) { if section == "email" && setting == "method" && value == "disabled" { value = "" } - if value.(string) != app.config.Section(section).Key(setting).MustString("") { + if (section == "discord" || section == "matrix") && setting == "language" { + tempConfig.Section("telegram").Key("language").SetValue(value.(string)) + } else if value.(string) != app.config.Section(section).Key(setting).MustString("") { tempConfig.Section(section).Key(setting).SetValue(value.(string)) } } diff --git a/discord.go b/discord.go index 4c55d00..e0bb75c 100644 --- a/discord.go +++ b/discord.go @@ -122,7 +122,6 @@ func (d *DiscordDaemon) ListRoles() (roles [][2]string, err error) { return } for _, role := range r { - fmt.Println(d.username) if role.Name != d.username && role.Name != "@everyone" { roles = append(roles, [2]string{role.ID, role.Name}) }