Skip to content

Commit 53a54bb

Browse files
committed
Fix feature flag check for ai
1 parent 2d0d781 commit 53a54bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/src/discussion/eventHandlers/onMessageCreated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async function createAiReply(message: DiscussionMessage) {
7070
}
7171
// Match @ai or @aipro and save in variable (something like /(^|\s)@ai(\s)/)
7272
const aiMentionRegex = /(?:^|\s)(@ai|@aipro)\s/;
73-
const aiMentioned = discussionMessageText.match(aiMentionRegex)?.[0];
73+
const aiMentioned = discussionMessageText.match(aiMentionRegex)?.[1];
7474
if (!aiMentioned) return;
7575

7676
const featureFlagsConfig = await getFeatureFlagsConfig();

0 commit comments

Comments
 (0)