Closed FliXii closed 5 months ago
The error is coming from the relay, in this case strfry. Do other relays give the same error?
What is the id you're giving there? Looks like it's an invalid id.
What is the id you're giving there? Looks like it's an invalid id.
My functionm for posting a message retourns the proerty field id of an event, this is the one that i am using for the query as parameter id. The code for the post looks like this.
Or is the id something else? I thought i must be correct as invalid ids are rejected by the relays.
Regarding @alexgleason: I have used 5 different relays and as seen two on the screenshot have replied in the same way. I will try also to use some other ones.
Try changing your code to this:
const event = await window.nostr.signEvent(baseEvent)
pool.publish(relays, event)
return event.id
Hey thanks for the idea, i have tried it out but the resulting Id from your code is identical to the one i used via the hash function.
Results in
If you change the pubkey you'll get a different id, that is probably what is happening there.
Anyway, what was your problem again? In your initial post you were getting an error from relays because (I guess) the id you were giving them. If you could run that part again and print out the id you were passing to the countActiveRelays
function and then I can try it here locally that will be great.
I have resolved the error now, the problem was the type of the id in the function parameters of countActiverelays, it has to be string[] instead of string. Now i dont get the stgfy error anymore from the relays, but still not the message back that i am trying to filter for. But i guess i will figure that or make a new post. Thanks anyways :-)
Hello, I am trying to retrieve how many relays are still holding a specific message and therefore i am trying to filter for id.
No matter what method for retrieving i use, get, querysnc or subscribemany, i always get:
My function looks like this:
what am i doing wrong? Thanks in advance