Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

RSS post description when available #390

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build go-neb
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

RUN apk add --no-cache -t build-deps git gcc musl-dev go make g++

Expand Down
5 changes: 5 additions & 0 deletions services/rssbot/rssbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,11 @@ func itemToHTML(feed *gofeed.Feed, item gofeed.Item) mevt.MessageEventContent {
html.EscapeString(item.Author.Email))
}
}

if item.Description != "" {
fmtBody += fmt.Sprintf("<br>%s", html.EscapeString(item.Description))
}

return mevt.MessageEventContent{
Body: fmt.Sprintf("%s: %s ( %s )",
html.EscapeString(feed.Title), html.EscapeString(itemTitle), html.EscapeString(item.Link)),
Expand Down