Browse Source

Fix up toot/notification replay to work with latest Masto.py release / masto 2.0

merge-requests/3/head
Mike C 5 years ago
parent
commit
b9f4b0ca9c
  1. 4
      botstreamlisteners.py

4
botstreamlisteners.py

@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS notification_cache (
if all_pages:
new_last_seen_toot_id = all_pages[0]['id']
if new_last_seen_toot_id > last_seen_toot_id:
if int(new_last_seen_toot_id) > last_seen_toot_id:
self.cursor.execute('insert into toot_cache values (?)',
(new_last_seen_toot_id, ))
self.conn.commit()
@ -153,7 +153,7 @@ CREATE TABLE IF NOT EXISTS notification_cache (
if first_page:
new_last_seen_notification_id = first_page[0]['id']
if new_last_seen_notification_id > last_seen_notification_id:
if int(new_last_seen_notification_id) > last_seen_notification_id:
self.cursor.execute('insert into notification_cache values (?)',
(new_last_seen_notification_id, ))
self.conn.commit()

Loading…
Cancel
Save