From 7364cfed5925924a198bcd846ac1ff457fd6385c Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Mon, 9 Nov 2020 19:34:22 +0100 Subject: [PATCH] Remove unused config --- activityStreams.go | 4 ++-- config.go | 31 ++++++++++++------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/activityStreams.go b/activityStreams.go index 96e2479..dfb99cf 100644 --- a/activityStreams.go +++ b/activityStreams.go @@ -88,7 +88,7 @@ func (p *post) toASNote() *asNote { // Content as.Content = string(p.html()) // Attachments - if images := p.Parameters[appConfig.Blogs[p.Blog].ActivityStreams.ImagesParameter]; len(images) > 0 { + if images := p.Parameters["images"]; len(images) > 0 { for _, image := range images { as.Attachment = append(as.Attachment, &asAttachment{ Type: "Image", @@ -109,7 +109,7 @@ func (p *post) toASNote() *asNote { } } // Reply - if replyLink := p.firstParameter(appConfig.Blogs[p.Blog].ActivityStreams.ReplyParameter); replyLink != "" { + if replyLink := p.firstParameter("replylink"); replyLink != "" { as.InReplyTo = replyLink } return as diff --git a/config.go b/config.go index c6a48d7..0d8e311 100644 --- a/config.go +++ b/config.go @@ -44,19 +44,18 @@ type configCache struct { } type configBlog struct { - Path string `mapstructure:"path"` - Lang string `mapstructure:"lang"` - TimeLang string `mapstructure:"timelang"` - Title string `mapstructure:"title"` - Description string `mapstructure:"description"` - Pagination int `mapstructure:"pagination"` - Sections map[string]*section `mapstructure:"sections"` - Taxonomies []*taxonomy `mapstructure:"taxonomies"` - Menus map[string]*menu `mapstructure:"menus"` - Photos *photos `mapstructure:"photos"` - ActivityStreams *activityStreams `mapstructure:"activitystreams"` - DefaultSection string `mapstructure:"defaultsection"` - CustomPages []*customPage `mapstructure:"custompages"` + Path string `mapstructure:"path"` + Lang string `mapstructure:"lang"` + TimeLang string `mapstructure:"timelang"` + Title string `mapstructure:"title"` + Description string `mapstructure:"description"` + Pagination int `mapstructure:"pagination"` + Sections map[string]*section `mapstructure:"sections"` + Taxonomies []*taxonomy `mapstructure:"taxonomies"` + Menus map[string]*menu `mapstructure:"menus"` + Photos *photos `mapstructure:"photos"` + DefaultSection string `mapstructure:"defaultsection"` + CustomPages []*customPage `mapstructure:"custompages"` } type section struct { @@ -89,12 +88,6 @@ type photos struct { Description string `mapstructure:"description"` } -type activityStreams struct { - Enabled bool `mapstructure:"enabled"` - ReplyParameter string `mapstructure:"replyParameter"` - ImagesParameter string `mapstructure:"imagesParameter"` -} - type customPage struct { Path string `mapstructure:"path"` Template string `mapstructure:"template"`