From 52e1d860cfbb37ef4dc2408af48ead4310501edd Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sat, 27 Apr 2024 00:20:08 -0700 Subject: [PATCH] nip10: add root function to get root id Signed-off-by: William Casarin --- src/util/nip10.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/nip10.rs b/src/util/nip10.rs index 5bed37e..8019e67 100644 --- a/src/util/nip10.rs +++ b/src/util/nip10.rs @@ -141,6 +141,10 @@ impl<'a> NoteReply<'a> { self.root.is_some() && self.reply.is_none() } + pub fn root(self) -> Option> { + self.root + } + pub fn is_reply(&self) -> bool { self.reply().is_some() }