fix for last message id in mastodon api

workspace
Brendan Howell 4 years ago
parent 59c6b88836
commit 345de36b2f

@ -351,9 +351,9 @@ class PublicRelations(Bureau):
prn.set(text_type="NORMAL") prn.set(text_type="NORMAL")
# store the last notification id # store the last notification id
self.last_mast_notif = notifications[0].id self.last_mast_notif = str(notifications[0].id)
with self.dbenv.begin(db=self.tweetdb, write=True) as txn: with self.dbenv.begin(db=self.tweetdb, write=True) as txn:
txn.put(b"last_mast_notif", self.last_mast_notif) txn.put(b"last_mast_notif", self.last_mast_notif.encode())
for note in notifications: for note in notifications:
username = note.account.display_name.encode("cp437", "ignore") + \ username = note.account.display_name.encode("cp437", "ignore") + \
b" (" + note.account.acct.encode("cp437", "ignore") + b")" b" (" + note.account.acct.encode("cp437", "ignore") + b")"

Loading…
Cancel
Save