diff --git a/bindings/nostr-ffi/src/event/builder.rs b/bindings/nostr-ffi/src/event/builder.rs index eb900b5ee..bd1617f87 100644 --- a/bindings/nostr-ffi/src/event/builder.rs +++ b/bindings/nostr-ffi/src/event/builder.rs @@ -130,14 +130,14 @@ impl EventBuilder { sender_keys: Arc, receiver_pubkey: Arc, content: String, - reply: Option>, + reply_to: Option>, ) -> Result { Ok(Self { builder: EventBuilderSdk::new_encrypted_direct_msg( sender_keys.deref(), *receiver_pubkey.as_ref().deref(), content, - reply.map(|id| id.as_ref().into()), + reply_to.map(|id| id.as_ref().into()), )?, }) } diff --git a/bindings/nostr-ffi/src/nostr.udl b/bindings/nostr-ffi/src/nostr.udl index f977d4692..9f1a33562 100644 --- a/bindings/nostr-ffi/src/nostr.udl +++ b/bindings/nostr-ffi/src/nostr.udl @@ -288,7 +288,7 @@ interface EventBuilder { [Name=set_contact_list] constructor(sequence list); [Throws=NostrError, Name=new_encrypted_direct_msg] - constructor(Keys sender_keys, PublicKey receiver_pubkey, string content, EventId? reply); + constructor(Keys sender_keys, PublicKey receiver_pubkey, string content, EventId? reply_to); [Name=delete] constructor(sequence ids, optional string? reason = null); [Name=new_reaction] diff --git a/bindings/nostr-js/src/event/builder.rs b/bindings/nostr-js/src/event/builder.rs index 3ec69ff44..fbf9322bf 100644 --- a/bindings/nostr-js/src/event/builder.rs +++ b/bindings/nostr-js/src/event/builder.rs @@ -104,14 +104,14 @@ impl JsEventBuilder { sender_keys: &JsKeys, receiver_pubkey: &JsPublicKey, content: String, - reply: Option, + reply_to: Option, ) -> Result { Ok(Self { builder: EventBuilder::new_encrypted_direct_msg( sender_keys.deref(), receiver_pubkey.into(), content, - reply.map(|id| id.into()), + reply_to.map(|id| id.into()), ) .map_err(into_err)?, }) diff --git a/bindings/nostr-sdk-ffi/src/nostr_sdk.udl b/bindings/nostr-sdk-ffi/src/nostr_sdk.udl index 9cbcb14db..507ec9dd3 100644 --- a/bindings/nostr-sdk-ffi/src/nostr_sdk.udl +++ b/bindings/nostr-sdk-ffi/src/nostr_sdk.udl @@ -308,7 +308,7 @@ interface EventBuilder { [Name=set_contact_list] constructor(sequence list); [Throws=NostrError, Name=new_encrypted_direct_msg] - constructor(Keys sender_keys, PublicKey receiver_pubkey, string content, EventId? reply); + constructor(Keys sender_keys, PublicKey receiver_pubkey, string content, EventId? reply_to); [Name=delete] constructor(sequence ids, optional string? reason = null); [Name=new_reaction] diff --git a/crates/nostr-sdk/src/client/mod.rs b/crates/nostr-sdk/src/client/mod.rs index 3078df0b9..043082b35 100644 --- a/crates/nostr-sdk/src/client/mod.rs +++ b/crates/nostr-sdk/src/client/mod.rs @@ -986,7 +986,7 @@ impl Client { &self, receiver: XOnlyPublicKey, msg: S, - reply: Option, + reply_to: Option, ) -> Result where S: Into, @@ -1010,11 +1010,11 @@ impl Client { return Err(Error::ResponseNotMatchRequest); } } else { - EventBuilder::new_encrypted_direct_msg(&self.keys, receiver, msg, reply)? + EventBuilder::new_encrypted_direct_msg(&self.keys, receiver, msg, reply_to)? }; #[cfg(not(feature = "nip46"))] - let builder = EventBuilder::new_encrypted_direct_msg(&self.keys, receiver, msg, reply)?; + let builder = EventBuilder::new_encrypted_direct_msg(&self.keys, receiver, msg, reply_to)?; self.send_event_builder(builder).await } diff --git a/crates/nostr/src/event/builder.rs b/crates/nostr/src/event/builder.rs index 2e50aedbf..579d1ba69 100644 --- a/crates/nostr/src/event/builder.rs +++ b/crates/nostr/src/event/builder.rs @@ -363,14 +363,14 @@ impl EventBuilder { sender_keys: &Keys, receiver_pubkey: XOnlyPublicKey, content: S, - reply: Option, + reply_to: Option, ) -> Result where S: Into, { let mut tags: Vec = vec![Tag::PubKey(receiver_pubkey, None)]; - if let Some(reply) = reply { - tags.push(Tag::Event(reply, None, None)); + if let Some(reply_to) = reply_to { + tags.push(Tag::Event(reply_to, None, None)); } Ok(Self::new( Kind::EncryptedDirectMessage,