Skip to content

Commit 307a103

Browse files
committed
refactor: Improve protocol availability
1 parent 374fd75 commit 307a103

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

logic/background_worker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def parse_blobs(blobs: list[bytes]) -> dict:
6666

6767
def background_worker(user_data, user_data_lock, ui_queue, stop_flag):
6868
# Incase we received a SMP question request last time and user did not answer it.
69-
smp_unanswered_questions(user_data, user_data_lock, ui_queue)
69+
# NOTE: this is not needed anymore, as we have implemented acknowlegements
70+
# smp_unanswered_questions(user_data, user_data_lock, ui_queue)
7071

7172
# Acknowledgements
7273
acks = {}
@@ -109,7 +110,6 @@ def background_worker(user_data, user_data_lock, ui_queue, stop_flag):
109110
sender = message["sender"]
110111
blob = message["blob"]
111112

112-
print("wtf you mean nigga?", message["ack_id"])
113113
ack_id = urlsafe_b64encode(message["ack_id"]).decode().rstrip("=")
114114
if "acks" not in acks:
115115
acks["acks"] = [ack_id]
@@ -141,7 +141,8 @@ def background_worker(user_data, user_data_lock, ui_queue, stop_flag):
141141
blob_plaintext = decrypt_xchacha20poly1305(chacha_key, contact_next_strand_nonce, blob)
142142

143143
except Exception as e:
144-
logger.error("Failed to decrypt blob from contact (%s) with error: %s", sender, str(e))
144+
logger.error("Failed to decrypt blob from contact (%s), we just going to treat blob as plaintext. Error: %s", sender, str(e))
145+
blob_plaintext = blob
145146
else:
146147
chacha_key = user_data["contacts"][sender]["contact_strand_key"]
147148

0 commit comments

Comments
 (0)