event: reset tags with [:0] instead of clear(), which keeps the length and leaves phantom empty tags on subsequent stdin events.

This commit is contained in:
Yasuhiro Matsumoto
2026-07-15 03:45:11 +09:00
parent 8eb6b7303c
commit 5d45849595

View File

@@ -206,7 +206,7 @@ example:
handleEvent := func(stdinEvent string) error {
evt.Content = ""
evt.CreatedAt = 0
clear(evt.Tags)
evt.Tags = evt.Tags[:0]
evt.ID = nostr.ZeroID
evt.PubKey = nostr.ZeroPK
evt.Sig = [64]byte{}