Closed boreq closed 11 months ago
I agree we shouldn't encourage these violations and support these extra fields as they threaten to become a new standard on their own.
In this case, however, I'm thinking that it wouldn't hurt to just ignore all extra fields aside from the first 2 and I'd say the good thing of having these arrays is that you can shove stuff on them after the first mandatory fields and no one should care. Maybe we should do that for all envelopes.
But I am now questioning my sanity and if this is really not harmful.
Let me ask Semisol why isn't he using a NOTICE
. That would have been more idiomatic.
I've changed EOSE and NOTICE to not break when an array of more than 2 elements is passed.
Today I found out that
wss://relay.noswhere.com
replies with the followingEOSE
messages:The returned array contains an extra element which specifies the reason behind this
EOSE
message. This causes theParseMessage
function to returnnil
asEOSEEnvelope.UnmarshalJSON
returns an error. The question is: should we do something about this and change the code so that this message is correctly parsed?In my opinion the situation is unclear because I'd view this as violating NIP-01 which is something I don't want to encourage.