mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-13 04:52:19 +02:00
fix CLOSED->CLOSE marshaling on CloseEnvelope.
This commit is contained in:
@ -257,7 +257,7 @@ func (v *CloseEnvelope) UnmarshalJSON(data []byte) error {
|
|||||||
|
|
||||||
func (v CloseEnvelope) MarshalJSON() ([]byte, error) {
|
func (v CloseEnvelope) MarshalJSON() ([]byte, error) {
|
||||||
w := jwriter.Writer{}
|
w := jwriter.Writer{}
|
||||||
w.RawString(`["CLOSED",`)
|
w.RawString(`["CLOSE",`)
|
||||||
w.Raw(json.Marshal(string(v)))
|
w.Raw(json.Marshal(string(v)))
|
||||||
w.RawString(`]`)
|
w.RawString(`]`)
|
||||||
return w.BuildBytes()
|
return w.BuildBytes()
|
||||||
|
Reference in New Issue
Block a user