From dcc6763e6a63c8e9a2c1559c260458c220dd792a Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Mon, 14 Sep 2020 22:38:10 +0100 Subject: [PATCH] updates --- komrade/backend/the_operator.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/komrade/backend/the_operator.py b/komrade/backend/the_operator.py index 7248f4c..b73c2a6 100644 --- a/komrade/backend/the_operator.py +++ b/komrade/backend/the_operator.py @@ -380,11 +380,14 @@ from_komrade = {from_komrade} inbox_old_encr = self.crypt_keys.get(deliver_to,prefix='/inbox/') self.log('encrypted inbox old:',inbox_old_encr) - inbox_old = SMessage( - self.privkey.data, - b64dec(deliver_to) - ).unwrap(inbox_old_encr) - self.log('decrypted inbox old:',inbox_old_encr) + if inbox_old_encr: + inbox_old = SMessage( + self.privkey.data, + b64dec(deliver_to) + ).unwrap(inbox_old_encr) + self.log('decrypted inbox old:',inbox_old_encr) + else: + inbox_old = b'' inbox_new = post_id + b'\n' + inbox_old self.log('decrypted inbox new:',inbox_old_encr)