Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365764
D13785.id45488.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.id45488.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
@@ -5,6 +5,7 @@
import invariant from 'invariant';
import bots from 'lib/facts/bots.js';
+import { inviteLinkURL } from 'lib/facts/links.js';
import { extractKeyserverIDFromID } from 'lib/keyserver-conn/keyserver-call-utils.js';
import { type NeynarWebhookCastCreatedEvent } from 'lib/types/farcaster-types.js';
import { messageTypes } from 'lib/types/message-types-enum.js';
@@ -282,7 +283,25 @@
threadID: sidebarThreadResponse.newThreadID,
});
- console.log(inviteLink);
+ const neynarConfig = await getNeynarConfig();
+
+ const replyText = `I created a thread on Comm. Join the conversation here: ${inviteLinkURL(
+ inviteLink.name,
+ )}`;
+
+ if (!neynarConfig?.signerUUID) {
+ throw new ServerError('missing_signer_uuid');
+ }
+
+ const postCaseResponse = await neynarClient?.postCast(
+ neynarConfig?.signerUUID,
+ 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, 7:37 AM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583901
Default Alt Text
D13785.id45488.diff (1 KB)
Attached To
Mode
D13785: [keyserver] reply on farcaster with invite link
Attached
Detach File
Event Timeline
Log In to Comment