fix encoding and decoding of event "extra" fields.
fixes https://github.com/nbd-wtf/go-nostr/issues/31
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@ func (evt *Event) UnmarshalJSON(payload []byte) error {
|
||||
evt.Sig = string(id)
|
||||
default:
|
||||
var anyValue any
|
||||
json.Unmarshal(v.MarshalTo(nil), anyValue)
|
||||
json.Unmarshal(v.MarshalTo([]byte{}), &anyValue)
|
||||
evt.extra[key] = anyValue
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user