aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--walrss/internal/rss/processor.go12
2 files changed, 12 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9856ae0..1f81348 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [0.3.4] - 2022-01-19
### Added
* Support for `ETag` and `Last-Modified` headers in feed responses
+### Changed
+* Added version number to email footer
## [0.3.3] - 2022-08-31
### Fixed
diff --git a/walrss/internal/rss/processor.go b/walrss/internal/rss/processor.go
index 947d98c..2a86546 100644
--- a/walrss/internal/rss/processor.go
+++ b/walrss/internal/rss/processor.go
@@ -29,7 +29,10 @@ const (
timeFormat = "15:04:05"
)
-var ua = struct{ua string; once *sync.Once}{"", new(sync.Once)}
+var ua = struct {
+ ua string
+ once *sync.Once
+}{"", new(sync.Once)}
func getUserAgent(st *state.State) string {
ua.once.Do(func() {
@@ -326,12 +329,17 @@ func generateEmail(st *state.State, processedItems []*processedFeed, interval, t
},
}
+ var versionSpecifier string
+ if core.Version != "" {
+ versionSpecifier = " v" + core.Version
+ }
+
renderer := hermes.Hermes{
Product: hermes.Product{
Name: "Walrss",
Link: st.Config.Server.ExternalURL,
Logo: st.Config.Server.ExternalURL + urls.Statics + "/logo_light.png",
- Copyright: fmt.Sprintf("This email was generated in %.2f seconds by Walrss - Walrss is open source software licensed under the GNU AGPL v3 - https://github.com/codemicro/walrss", timeToGenerate.Seconds()),
+ Copyright: fmt.Sprintf("This email was generated in %.2f seconds by Walrss"+versionSpecifier+" - Walrss is open source software licensed under the GNU AGPL v3 - https://github.com/codemicro/walrss", timeToGenerate.Seconds()),
},
Theme: new(hermes.Flat),
}