python-nostr
python-nostr copied to clipboard
How to get all replies of an event
Let's say I have an event id, How can I find all the replies for that post
You can do that using the README.md example named "Receive events from relays", but you need to use two filters:
filters = Filters([
Filter(event_ids=[event_id], kinds=[EventKind.TEXT_NOTE]),
Filter(event_refs=[event_id], kinds=[EventKind.TEXT_NOTE])
])
I really don't know if it's the most appropriate way but it worked for me. I'm just starting to explore this library.