From bf48671e5673fe4b5dc3aee7995682cdcfd357f2 Mon Sep 17 00:00:00 2001 From: koalasat Date: Tue, 22 Jul 2025 18:04:55 +0200 Subject: [PATCH] Fix nostr --- api/nostr.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/nostr.py b/api/nostr.py index af6d2fd2..6a55c4ae 100644 --- a/api/nostr.py +++ b/api/nostr.py @@ -4,7 +4,7 @@ import uuid from secp256k1 import PrivateKey from asgiref.sync import sync_to_async -from nostr_sdk import Keys, Client, EventBuilder, NostrSigner, Kind, Tag +from nostr_sdk import Keys, Client, EventBuilder, NostrSigner, Kind, Tag, PublicKey from api.models import Order from decouple import config @@ -59,7 +59,9 @@ class Nostr: Tag.parse(["status", Order.Status(order.status).label]), ] - await client.send_private_msg(robot.nostr_pubkey, text, tags) + await client.send_private_msg( + PublicKey.from_hex(robot.nostr_pubkey), text, tags + ) print("Nostr NOTIFICATION event sent") async def initialize_client(self, keys):