fix: Hotfix/consider new conferencing and old video app categories (#10134)

* Consider new conferencing and old video app categories

* Add comment
pull/9993/head
Hariom Balhara 2023-07-13 17:27:49 +05:30 committed by GitHub
parent 26afc077a7
commit 54833b65ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -623,6 +623,7 @@ enum AppCategories {
web3 // deprecated, we should no longer have any web3 apps
automation
analytics
// Wherever video is in use, conferencing should also be used for legacy apps can have it.
conferencing
crm
}

View File

@ -72,7 +72,10 @@ export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOp
for (const eventType of eventTypes) {
if (eventType.locations) {
// If it's a video, replace the location with Cal video
if (credential.app?.categories.includes(AppCategories.video)) {
if (
credential.app?.categories.includes(AppCategories.video) ||
credential.app?.categories.includes(AppCategories.conferencing)
) {
// Find the user's event types
// Look for integration name from app slug

View File

@ -20,7 +20,7 @@ export const locationOptionsHandler = async ({ ctx, input }: LocationOptionsOpti
userId: ctx.user.id,
app: {
categories: {
has: AppCategories.video,
hasSome: [AppCategories.conferencing, AppCategories.video],
},
},
},