diff --git a/src/transmute.ts b/src/transmute.ts index 51f8995..b024913 100644 --- a/src/transmute.ts +++ b/src/transmute.ts @@ -148,6 +148,8 @@ async function toStatus(event: Event<1>) { type Mention = Awaited>; function buildInlineRecipients(mentions: Mention[]): string { + if (!mentions.length) return ''; + const elements = mentions.reduce((acc, { url, username }) => { const name = nip21.BECH32_REGEX.test(username) ? username.substring(0, 8) : username; acc.push(`@${name}`);