Page MenuHomePhabricator

D13841.id45548.diff
No OneTemporary

D13841.id45548.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
@@ -7,6 +7,7 @@
const taggedCommFarcasterInputValidator =
neynarWebhookCastCreatedEventValidator;
+const threadHashTagRegex = /\B#createathread\b/i;
async function taggedCommFarcasterResponder(request: $Request): Promise<void> {
const event = assertWithValidator(
@@ -14,6 +15,13 @@
taggedCommFarcasterInputValidator,
);
+ const { text: eventText } = event.data;
+ const foundCreateThreadHashTag = threadHashTagRegex.test(eventText);
+
+ if (!foundCreateThreadHashTag) {
+ return;
+ }
+
console.log(event);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 4:01 AM (15 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2587686
Default Alt Text
D13841.id45548.diff (800 B)

Event Timeline