Fixes for Pleroma: Empty strings mean no CW, oi['object']['id'] compares to uri field in db

This commit is contained in:
QBFreak 2018-12-29 18:58:43 -05:00
parent 6393ccb9e0
commit 56a5a3fff5

View file

@ -183,14 +183,14 @@ for f in following:
# its a toost baby
content = oi['object']['content']
if oi['object']['summary'] != None:
if oi['object']['summary'] != None and oi['object']['summary'] != "":
#don't download CW'd toots
continue
toot = extract_toot(content)
# print(toot)
try:
if pleroma:
if c.execute("SELECT COUNT(*) FROM toots WHERE id LIKE ?", (oi['object']['id'],)).fetchone()[0] > 0:
if c.execute("SELECT COUNT(*) FROM toots WHERE uri LIKE ?", (oi['object']['id'],)).fetchone()[0] > 0:
#we've caught up to the notices we've already downloaded, so we can stop now
done = True
break