diff --git a/keyserver/src/responders/farcaster-webhook-responders.js b/keyserver/src/responders/farcaster-webhook-responders.js --- a/keyserver/src/responders/farcaster-webhook-responders.js +++ b/keyserver/src/responders/farcaster-webhook-responders.js @@ -326,6 +326,7 @@ const postCastResponse = await neynarClient?.postCast( neynarConfig.signerUUID, castHash, + undefined, replyText, ); diff --git a/lib/utils/neynar-client.js b/lib/utils/neynar-client.js --- a/lib/utils/neynar-client.js +++ b/lib/utils/neynar-client.js @@ -348,14 +348,26 @@ async postCast( signerUUID: string, parent: string, - text: string, + embeds?: $ReadOnlyArray<{ url: string }>, + text?: string, ): Promise { const url = getNeynarURL('2', 'cast', {}); - const body = { + const body: { + signer_uuid: string, + parent: string, + text?: string, + embeds?: $ReadOnlyArray<{ url: string }>, + } = { signer_uuid: signerUUID, parent, - text, }; + + if (embeds) { + body.embeds = embeds; + } + if (text) { + body.text = text; + } try { const response = await fetch(url, { method: 'POST',