-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to retrieve the last 3 notes from a user? #105
Comments
Can you paste your code? |
Basically is like in your example but modify the code like this: // create filters
var filters nostr.Filters
if _, v, err := nip19.Decode(npub); err == nil {
t := make(map[string][]string)
// making a "p" tag for the above public key.
// this filters for messages tagged with the user, mainly replies.
t["p"] = []string{v.(string)}
filters = []nostr.Filter{{
Kinds: []int{nostr.KindTextNote},
Authors: []string{"<HARDCODED-PUB-KEY-HERE>"}
Tags: t,
Limit: 3, |
Maybe the relay you're querying doesn't have any of the results you want? That's the only explanation I can think of. Maybe try doing the same query manually or with https://github.com/fiatjaf/nak. |
Silly me! I was querying a closed relay that is behind a paywall 🙈 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I am trying to retrieve the last 3 notes from a single user (by modifying
example.go
) but I dont understand how to do this.I am using the
Author
field in thefilters
but the results from the relay are empty.The text was updated successfully, but these errors were encountered: