diff --git a/nostr_dvm/bot.py b/nostr_dvm/bot.py index 8960ff9..502dbd0 100644 --- a/nostr_dvm/bot.py +++ b/nostr_dvm/bot.py @@ -95,7 +95,7 @@ class Bot: await handle_dm(nostr_event, False) except Exception as e: print(f"Error during content NIP04 decryption: {e}") - elif nostr_event.kind().match_enum(KindEnum.GIFT_WRAP()): + elif nostr_event.kind() == Kind.from_enum(KindEnum.GIFT_WRAP(): try: await handle_dm(nostr_event, True) except Exception as e: @@ -120,7 +120,7 @@ class Bot: # Check timestamp of rumor if rumor.created_at().as_secs() >= Timestamp.now().as_secs(): - if rumor.kind() == Kind.from_enum(KindEnum.GIFT_WRAP()): + if rumor.kind() == Kind.from_enum(KindEnum.SEALED_DIRECT()): decrypted_text = rumor.content() print(f"Received new msg [sealed]: {decrypted_text}") sealed = " [sealed] "