publish: avoid nil panic when --reply decodes to an unexpected type.

This commit is contained in:
Yasuhiro Matsumoto
2026-05-05 21:15:00 +09:00
parent a152d7f633
commit 47e462fe55

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)