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 { const event = assertWithValidator( @@ -14,6 +15,13 @@ taggedCommFarcasterInputValidator, ); + const { text: eventText } = event.data; + const foundCreateThreadHashTag = threadHashTagRegex.test(eventText); + + if (!foundCreateThreadHashTag) { + return; + } + console.log(event); }