Scheduling infrastructure for absolutely everyone.
feat: allow plain ask a question for paid users only (#20390)
Amit Sharma81de95bd2801
diff --git a/apps/web/lib/plain/plainChat.tsx b/apps/web/lib/plain/plainChat.tsxindex 7b85b88be72..4c6de541dc5 100644--- a/apps/web/lib/plain/plainChat.tsx+++ b/apps/web/lib/plain/plainChat.tsx@@ -87,6 +87,7 @@ const PlainChat = IS_PLAIN_CHAT_ENABLEDconst shouldOpenPlain = pathname === "/event-types" && searchParams?.has("openPlain");const userEmail = session?.user?.email;+ const isPaidUser = session?.user.belongsToActiveTeam || !!session?.user.org;const isAppDomain = useMemo(() => {const restrictedPathsSet = new Set(@@ -166,14 +167,6 @@ const PlainChat = IS_PLAIN_CHAT_ENABLED},],chatButtons: [- {- icon: "chat",- text: "Ask a question",- threadDetails: {- labelTypeIds: ["lt_01JFJWNWAC464N8DZ6YE71YJRF"],- tierIdentifier: { externalId: data.userTier },- },- },{icon: "bulb",text: "Send feedback",@@ -238,6 +231,17 @@ const PlainChat = IS_PLAIN_CHAT_ENABLED},};+ if (isPaidUser) {+ plainChatConfig.chatButtons.push({+ icon: "chat",+ text: "Ask a question",+ threadDetails: {+ labelTypeIds: ["lt_01JFJWNWAC464N8DZ6YE71YJRF"],+ tierIdentifier: { externalId: data.userTier },+ },+ });+ }+if (process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test") {window.__PLAIN_CONFIG__ = plainChatConfig;}