Repository: miniflux/v2 (language: go)

Issue:
Matrix bot sends empty messages
It seems that the matrix bot unconditionally sends out messages even when there are actually no new entries:
![image](https://user-images.githubusercontent.com/1381736/204712275-02f509bb-3097-4fb2-89ea-0b215ff10b46.png)

The `PushEntries` function (or its caller) should be fixed to prevent these messages from going out.


Discussion / hints:

Fix patch:
diff --git a/reader/processor/processor.go b/reader/processor/processor.go
index 5beaaf207d3..e0bdf36d2a5 100644
--- a/reader/processor/processor.go
+++ b/reader/processor/processor.go
@@ -107,7 +107,7 @@ func ProcessFeedEntries(store *storage.Storage, feed *model.Feed, user *model.Us
 	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 {
+	} else if intg != nil && len(entriesToPush) > 0 {
 		go func() {
 			integration.PushEntries(entriesToPush, intg)
 		}()


Test patch: