mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
fix: Handle empty notifications
This commit is contained in:
parent
fa0b6a63b9
commit
3907777c91
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user