When the message in the response object is an empty string, validateFileUploadResponse treats it as an invalid response.
This is because !response.message is used in the if statement.
Some file storage servers (e.g., https://github.com/quentintaranpino/nostrcheck-server) return an empty message, which results in responses from such file storage servers being considered invalid.
Is this the intended behavior?
When the
message
in the response object is an empty string,validateFileUploadResponse
treats it as an invalid response. This is because!response.message
is used in the if statement.https://github.com/nbd-wtf/nostr-tools/blob/bf0c4d4988a31670e788b200e787c51d20900868/nip96.ts#L272-L274
Some file storage servers (e.g., https://github.com/quentintaranpino/nostrcheck-server) return an empty message, which results in responses from such file storage servers being considered invalid. Is this the intended behavior?
reproduction