add title

This commit is contained in:
2022-05-07 21:01:14 -04:00
parent 3f4be7b0ae
commit 7d8f7b58a8
4 changed files with 10 additions and 6 deletions

View File

@ -104,7 +104,7 @@ func ProcessFeed(feed FeedCfg, scheduler Scheduler, dbDir string, tgram telegram
Time: time.Now(),
FeedEntry: entry,
}
err := tgram.SendLink(entry.Link, feed.Channel, feed.Rhash)
err := tgram.SendLink(entry.Link, feed.Channel, feed.Rhash, feed.Title)
if err != nil {
log.Error("failed to send to telegram", "feed", feed.Name, "link", entry.Link, "channel", feed.Channel, "rhash", feed.Rhash, "error", err)
r.Status = Error

View File

@ -20,6 +20,7 @@ type FeedCfg struct {
Cron string `yaml:"cron"`
Proxy string `yaml:"proxy"`
Type parser.FeedType `yaml:"type"`
Title string `yaml:"title"`
FTL *int `yaml:"first_time_limit"`
FirstTimeLimit FeedLimit `yaml:"-"`
}