fix: Handle empty notifications

This commit is contained in:
Manuel Cortez 2024-01-05 11:13:37 -06:00
parent fa0b6a63b9
commit 3907777c91
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -135,6 +135,10 @@ class Session(base.baseSession):
else:
last_id = self.db[name][-1].id
for i in data:
# handle empty notifications.
post_types = ["status", "mention", "reblog", "favourite", "update", "poll"]
if hasattr(i, "type") and i.type in post_types and i.status == None:
continue
if ignore_older and last_id != None:
if i.id < last_id:
log.error("Ignoring an older tweet... Last id: {0}, tweet id: {1}".format(last_id, i.id))