mikedilger / relay-manager

Command line nostr relay management
MIT License
1 stars 1 forks source link

stop duplicating payload in the body of the event #2

Closed fiatjaf closed 2 months ago

fiatjaf commented 2 months ago

Sorry, I edited this file on GitHub so it's probably broken, but I don't know if this is correct. Are you taking the same content sent in the body of the POST and putting it inside the event which is then base64d and sent as a header? This feels wrong, I think we can get away with just the hash of the content, no?

Also, maybe we should remove the URL and method from the tags because they're completely irrelevant (I know NIP-98 mentions them, but still we gain nothing by following that).

mikedilger commented 2 months ago

Oh shit! Good catch. That was not what I thought I had done. I must be having Joe Biden moments.

mikedilger commented 2 months ago

The url and method limit the scope of replays. But if all commands are idempotent (and I think they are) then it doesn't really matter. So we could remove them. Or we could just pare it back to the host which limits replay onto other hosts running the same software.

fiatjaf commented 2 months ago

OK, I think the host makes sense. I hadn't thought about replays. Let's do that. I should write this on the NIP.

The full URL and method don't really do anything since they're always the same, no?

mikedilger commented 2 months ago

The full URL and method don't really do anything since they're always the same, no?

Right.