Clients already need to order multiple kind0s based on created_at to account for relays having older versions.
So clients should handle a relay returning multiple kind0s just fine
i literally just realised this, but it was partly an accident because the find and delete code in khatru (and in eventstore) was getting stuck because of race coditions and i realised that this procedure is inherently racy and dangerous
i hadn't actually changed my profile data since i got this relay running so i just changed my profile and lo and behold:
me@iox:~$ cat Documents/mleku.jsonl|grep kind\":0|grep 4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f
{"id":"68b722312787e4b4dce50a557ba37110e82c9149a3c5731d51164676f2ebd517","pubkey":"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f","created_at":1707048883,"kind":0,"tags":[["t","bitcoin"],["t","lightningnetwork"],["t","nostr"],["t","golang"]],"content":"{\"banner\":\"
/1280px-Pleiades_large.jpg\",\"picture\":\"
\",\"website\":\"https://mleku.online/git\",\"lud16\":\"livelywave457069@getalby.com\",\"nip05\":\"_@nostr.mleku.online\",\"name\":\"mleku\",\"about\":\"npub1...hsmmleku\\n\\nHis Salty Majesty Mleku:\\n\\nrogue cyber hornet computer scientist and engineer building things for #bitcoin, #lightningnetwork and #nostr in #golang\"}","sig":"c1aa30fb1e62e25cea83c869c057f804be3ab2f1b4d8f1ebb2c7bc426c3daf3884d8391713a9fd47d4a9421cc702b82079332df9747f8485d288fbc163cb5290"}
{"id":"3989d8f64d67a0a2dba88c71425acf4e0788c1cd791f8f2a1ebe679640d31534","pubkey":"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f","created_at":1707642118,"kind":0,"tags":[["t","bitcoin"],["t","lightningnetwork"],["t","nostr"],["t","golang"],["t","milk"],["t","gfy"]],"content":"{\"banner\":\"
/1280px-Pleiades_large.jpg\",\"picture\":\"
\",\"website\":\"https://mleku.online/git\",\"lud16\":\"livelywave457069@getalby.com\",\"nip05\":\"_@nostr.mleku.online\",\"name\":\"mleku\",\"about\":\"npub1...hsmmleku\\n\\nHis Salty Majesty Mleku:\\n\\nrogue cyber hornet computer scientist and engineer building things for #bitcoin, #lightningnetwork and #nostr in #golang\\n\\n#milk is #gfy\"}","sig":"6b3c8b2678cca193826b7ff0bbcb62587f4bf0cb4ead6aeda3099788cbceb9e52d67f4292bd9e306471255cb5f5bf9cbe5f727d90637055fa7f30628eaee4118"}
yes, there is two kind 0 events with my pubkey on it
no idea how the clients are going to react to that, i guess they request just one so maybe i only need to change the ordering so it always gives the newest one first and then if more are asked for it feeds that number in the history
Clients already need to order multiple kind0s based on created_at to account for relays having older versions.
So clients should handle a relay returning multiple kind0s just fine
i think they do need to be sent in reverse chronological order in case they expect to use the first one, this seems like the most obvious expected behaviour... it happens that khatru already sorts results by this order
ohhh this isn't the results it's the queries, it puts newer date queries in front of older... i need to revise this more yet
If a client is a relaying heavily on in which order events are coming and not sorting locally it will have a bad time