Page MenuHomePhabricator

D13785.id45368.diff
No OneTemporary

D13785.id45368.diff

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
@@ -233,9 +233,10 @@
}
}
+ const { hash: castHash, parent_hash: parentHash } = event.data;
const sidebarThreadResponse = await createCastSidebar(
- event.data.hash,
- event.data.parent_hash,
+ castHash,
+ parentHash,
event.data.channel?.name,
channelCommunityID,
);
@@ -252,7 +253,23 @@
threadID: sidebarThreadResponse.newThreadID,
});
- console.log(inviteLink);
+ const neynarConfig = await getNeynarConfig();
+
+ if (!neynarConfig?.signerUUID) {
+ throw new ServerError('missing_signer_uuid');
+ }
+
+ const replyText = `Join the conversation at https://comm.app/invite/${inviteLink.name}!`;
+
+ const postCaseResponse = await neynarClient?.postCast(
+ neynarConfig?.signerUUID,
+ parentHash ? parentHash : castHash,
+ replyText,
+ );
+
+ if (!postCaseResponse?.success) {
+ throw new ServerError('post_cast_failed');
+ }
}
export { taggedCommFarcasterResponder, taggedCommFarcasterInputValidator };

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 9:40 AM (20 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584040
Default Alt Text
D13785.id45368.diff (1 KB)

Event Timeline