Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3366126
D13785.id45368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13785.id45368.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13785: [keyserver] reply on farcaster with invite link
Attached
Detach File
Event Timeline
Log In to Comment