From 40d48d2de301d4045c4d3a4d4dc68c44ee99eb2a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 9 Dec 2025 02:12:03 +0100 Subject: [PATCH] Ensure proper initialization of DefaultContentType in config --- config/config.go | 1 + config/toml.go | 2 +- config/toml_default.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index f31e7ba..a779ae9 100644 --- a/config/config.go +++ b/config/config.go @@ -842,6 +842,7 @@ func parseGeneral(cfg GeneralTOML) General { general.ShowBoostedUser = NilDefaultBool(cfg.ShowBoostedUser, def.ShowBoostedUser) general.DynamicTimelineName = NilDefaultBool(cfg.DynamicTimelineName, def.DynamicTimelineName) general.CommandsInNewPane = NilDefaultBool(cfg.CommandsInNewPane, def.CommandsInNewPane) + general.DefaultContentType = NilDefaultString(cfg.DefaultContentType, def.DefaultContentType) lp := NilDefaultString(cfg.ListPlacement, def.ListPlacement) switch lp { diff --git a/config/toml.go b/config/toml.go index 16a3972..28b67e4 100644 --- a/config/toml.go +++ b/config/toml.go @@ -38,7 +38,7 @@ type GeneralTOML struct { ShowBoostedUser *bool `toml:"show-boosted-user"` DynamicTimelineName *bool `toml:"dynamic-timeline-name"` CommandsInNewPane *bool `toml:"commands-in-new-pane"` - DefaultContentType string `toml:"default-content-type"` + DefaultContentType *string `toml:"default-content-type"` } type TimelineTOML struct { diff --git a/config/toml_default.go b/config/toml_default.go index 64bbb02..1f5a00e 100644 --- a/config/toml_default.go +++ b/config/toml_default.go @@ -43,6 +43,7 @@ var ConfigDefault = ConfigTOML{ TerminalTitle: ip(0), LeaderKey: sp(""), LeaderTimeout: ip64(1000), + DefaultContentType: sp("text/plain"), NotificationsToHide: &[]string{}, Timelines: &[]TimelineTOML{ {