Avoid dispatching when there's no feed updates (#173)

* Avoid dispatching when there's no feed updates

* version bump
This commit is contained in:
jack1142
2020-10-14 16:06:53 +02:00
committed by GitHub
parent 763539f352
commit edb5be3a25

View File

@@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType
log = logging.getLogger("red.aikaterna.rss")
__version__ = "1.1.21"
__version__ = "1.1.22"
class RSS(commands.Cog):
@@ -872,6 +872,10 @@ class RSS(commands.Cog):
log.debug(f"Couldn't match anything for feed {name} on cid {channel.id}, only posting 1 post")
feedparser_plus_objects = [feedparser_plus_objects[0]]
if not feedparser_plus_objects:
# early-exit so that we don't dispatch when there's no updates
return
# post oldest first
feedparser_plus_objects.reverse()