From 38dff1f9abe4246fc9f4a7f2acd82918c36cf9e8 Mon Sep 17 00:00:00 2001 From: Believethehype Date: Fri, 29 Dec 2023 23:11:04 +0100 Subject: [PATCH] avoid dm deadlock --- nostr_dvm/bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nostr_dvm/bot.py b/nostr_dvm/bot.py index d251cd7..3895acf 100644 --- a/nostr_dvm/bot.py +++ b/nostr_dvm/bot.py @@ -82,6 +82,8 @@ class Bot: def handle_dm(nostr_event): sender = nostr_event.pubkey().to_hex() + if sender == self.keys.public_key().to_hex(): + return try: decrypted_text = nip04_decrypt(self.keys.secret_key(), nostr_event.pubkey(), nostr_event.content())