Skip to content

Commit

Permalink
nip10: add root function to get root id
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Apr 27, 2024
1 parent eabf4b1 commit 52e1d86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util/nip10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ impl<'a> NoteReply<'a> {
self.root.is_some() && self.reply.is_none()
}

pub fn root(self) -> Option<NoteIdRef<'a>> {
self.root
}

pub fn is_reply(&self) -> bool {
self.reply().is_some()
}
Expand Down

0 comments on commit 52e1d86

Please sign in to comment.