NIP-18 describes notes of kind 6. Implement checks to enforce conformance to NIP-18:
Ensure that an e tag is present and it includes a recommended relay URL.
Content body should be empty OR a JSON blob with a valid event with the same id as the e tag.
If a p tag is included and a JSON blob, check that the p value matches the author pubkey in the content JSON.
Out of scope: Checking whether the reposted event exists and is correct. It is possible (perhaps frequent) that Memorelay could receive a repost event but not have knowledge of the original event being reposted. For that reason, it is not required to perform conformance checks on the target of the repost. Checking for internal consistence is sufficient.
Note: Issue a NOTICE message to a client if it posts a note which is not conformant.
NIP-18 describes notes of kind 6. Implement checks to enforce conformance to NIP-18:
e
tag is present and it includes a recommended relay URL.e
tag.p
tag is included and a JSON blob, check that thep
value matches the author pubkey in the content JSON.Out of scope: Checking whether the reposted event exists and is correct. It is possible (perhaps frequent) that Memorelay could receive a repost event but not have knowledge of the original event being reposted. For that reason, it is not required to perform conformance checks on the target of the repost. Checking for internal consistence is sufficient.
Note: Issue a
NOTICE
message to a client if it posts a note which is not conformant.