🐛 Fix delete session with client side actions
This commit is contained in:
@@ -17,6 +17,9 @@ export const sendWhatsAppInitialMessage = authenticatedProcedure
|
||||
async ({ input: { to, typebotId, startGroupId }, ctx: { user } }) => {
|
||||
const apiToken = await prisma.apiToken.findFirst({
|
||||
where: { ownerId: user.id },
|
||||
select: {
|
||||
token: true,
|
||||
},
|
||||
})
|
||||
if (!apiToken)
|
||||
throw new TRPCError({
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Text,
|
||||
} from '@chakra-ui/react'
|
||||
import { runtimes } from '../data'
|
||||
import { getFeatureFlags } from '@/features/telemetry/posthog'
|
||||
import { isWhatsAppAvailable } from '@/features/telemetry/posthog'
|
||||
|
||||
type Runtime = (typeof runtimes)[number]
|
||||
|
||||
@@ -38,9 +38,7 @@ export const RuntimeMenu = ({ selectedRuntime, onSelectRuntime }: Props) => {
|
||||
{runtimes
|
||||
.filter((runtime) => runtime.name !== selectedRuntime.name)
|
||||
.filter((runtime) =>
|
||||
runtime.name === 'WhatsApp'
|
||||
? getFeatureFlags().includes('whatsApp')
|
||||
: true
|
||||
runtime.name === 'WhatsApp' ? isWhatsAppAvailable() : true
|
||||
)
|
||||
.map((runtime) => (
|
||||
<MenuItem
|
||||
|
||||
Reference in New Issue
Block a user