mirror of
https://github.com/fiatjaf/nak.git
synced 2026-06-04 09:41:24 +02:00
publish: avoid nil panic when --reply decodes to an unexpected type.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user