fix: CountEnvelope json.Marshal

This commit is contained in:
ann 2024-05-20 17:29:34 +08:00 committed by fiatjaf_
parent 7ccd0e7192
commit 9a29edca41

View File

@ -190,7 +190,7 @@ func (v CountEnvelope) MarshalJSON() ([]byte, error) {
w.RawString(`["COUNT",`)
w.RawString(`"` + v.SubscriptionID + `"`)
if v.Count != nil {
w.RawString(fmt.Sprintf(`{"count":%d}`, *v.Count))
w.RawString(fmt.Sprintf(`,{"count":%d}`, *v.Count))
} else {
for _, filter := range v.Filters {
w.RawString(`,`)