fix: null relay tag in event reply

This commit is contained in:
Kieran 2024-01-26 11:24:58 +00:00
parent d3e6ddc64c
commit f9a0516718
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,7 @@ export class NostrLink implements ToNostrEventTag {
}
toEventTag(marker?: string) {
const relayEntry = this.relays ? [this.relays[0]] : [];
const relayEntry = this.relays?.at(0) ? [this.relays[0]] : [];
if (marker) {
if (relayEntry.length === 0) {

View File

@ -25,6 +25,7 @@ export interface NostrEvent {
tags: Array<Array<string>>;
content: string;
sig: string;
relays?: Array<string>;
}
export type ReqCommand = ["REQ", id: string, ...filters: Array<ReqFilter>];