mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-06-23 13:00:50 +02:00
Update bot.py
This commit is contained in:
parent
b751061881
commit
32664f8f9b
@ -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] "
|
||||
|
Loading…
x
Reference in New Issue
Block a user