From 345de36b2fa282903c3d4ffdbeabf1230721b02c Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 13 Nov 2020 00:48:01 +0100 Subject: [PATCH] fix for last message id in mastodon api --- screenless/bureau/publicrelations/publicrelations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/screenless/bureau/publicrelations/publicrelations.py b/screenless/bureau/publicrelations/publicrelations.py index b058620..bee74a4 100644 --- a/screenless/bureau/publicrelations/publicrelations.py +++ b/screenless/bureau/publicrelations/publicrelations.py @@ -351,9 +351,9 @@ class PublicRelations(Bureau): prn.set(text_type="NORMAL") # 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: - 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: username = note.account.display_name.encode("cp437", "ignore") + \ b" (" + note.account.acct.encode("cp437", "ignore") + b")"