Merge pull request #127 from mattn/fix/publish-reply-nil-panic

publish: avoid nil panic when --reply decodes to an unexpected type
This commit is contained in:
mattn
2026-05-05 21:18:10 +09:00
committed by GitHub

View File

@@ -91,6 +91,8 @@ example:
replyEvent, _, err = sys.FetchSpecificEvent(ctx, pointer, sdk.FetchSpecificEventParameters{})
case nostr.EntityPointer:
replyEvent, _, err = sys.FetchSpecificEvent(ctx, pointer, sdk.FetchSpecificEventParameters{})
default:
return fmt.Errorf("unexpected reply target type: %T", value)
}
if err != nil {
return fmt.Errorf("failed to fetch reply target event: %w", err)