From 361fa3172d847febbd04c99934f3c6d19b5bbf35 Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Fri, 18 Sep 2020 12:17:18 +0100 Subject: [PATCH] komrade update! --- komrade/backend/the_operator.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/komrade/backend/the_operator.py b/komrade/backend/the_operator.py index bccb79f..6d03b1c 100644 --- a/komrade/backend/the_operator.py +++ b/komrade/backend/the_operator.py @@ -469,25 +469,19 @@ class TheOperator(Operator): self.log('<--',msg_to_op.msg_d) # attached msg - attached_msg = msg_to_op.msg + attached_msg = msg_to_op.msg.get('data') self.log('attached_msg =',attached_msg) + if not attached_msg: return - # just store as encrypted binary? - msg_to_op.encrypt() - self.log('<--',msg_to_op.msg_d) - - # encr without metadata - encr_msg_content = msg_to_op.msg - self.log('encr_msg_content',encr_msg_content) - - # save + # just store as the encrypted binary -> world it came in? + # save post_id = get_random_binary_id() self.crypt_data.set( post_id, - encr_msg_content, + attached_msg, prefix='/post/' ) - self.log(f'put {encr_msg_content} in {post_id}') + self.log(f'put {attached_msg} in {post_id}') # update post index post_index = self.get_inbox_crypt(