mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add Telegram integration
This commit is contained in:
parent
93596c1218
commit
34dd358eb0
25 changed files with 173 additions and 4 deletions
|
@ -14,6 +14,8 @@ import (
|
|||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"miniflux.app/integration"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/logger"
|
||||
|
@ -80,6 +82,18 @@ func ProcessFeedEntries(store *storage.Storage, feed *model.Feed) {
|
|||
// The sanitizer should always run at the end of the process to make sure unsafe HTML is filtered.
|
||||
entry.Content = sanitizer.Sanitize(entry.URL, entry.Content)
|
||||
|
||||
if entryIsNew {
|
||||
intg, err := store.Integration(feed.UserID)
|
||||
if err != nil {
|
||||
logger.Error("[Processor] Get integrations for user %d failed: %v; the refresh process will go on, but no integrations will run this time.", feed.UserID, err)
|
||||
} else if intg != nil {
|
||||
localEntry := entry
|
||||
go func() {
|
||||
integration.PushEntry(localEntry, intg)
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
updateEntryReadingTime(store, feed, entry, entryIsNew)
|
||||
filteredEntries = append(filteredEntries, entry)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue