From fc6a5a04e93078f5ef648656ec30bccd9ceba374 Mon Sep 17 00:00:00 2001 From: Aubin Date: Fri, 10 Jan 2025 13:47:10 +0100 Subject: [PATCH] use the generic function to check brand help center enabled --- connectors/src/connectors/zendesk/temporal/activities.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/connectors/src/connectors/zendesk/temporal/activities.ts b/connectors/src/connectors/zendesk/temporal/activities.ts index a96c14daf194..6c2f04711a4f 100644 --- a/connectors/src/connectors/zendesk/temporal/activities.ts +++ b/connectors/src/connectors/zendesk/temporal/activities.ts @@ -17,6 +17,7 @@ import { fetchZendeskTicketComments, fetchZendeskTickets, getZendeskBrandSubdomain, + isBrandHelpCenterEnabled, } from "@connectors/connectors/zendesk/lib/zendesk_api"; import { ZENDESK_BATCH_SIZE } from "@connectors/connectors/zendesk/temporal/config"; import { dataSourceConfigFromConnector } from "@connectors/lib/api/data_source_config"; @@ -213,11 +214,7 @@ export async function getZendeskHelpCenterReadAllowedBrandIdsActivity( if (!fetchedBrand) { await brandInDb?.revokeTicketsPermissions(); await brandInDb?.revokeHelpCenterPermissions(); - } else if ( - // TODO(2025-01-10 aubin): replace this with the generic function isBrandHelpCenterEnabled - !fetchedBrand.has_help_center || - fetchedBrand.help_center_state !== "enabled" - ) { + } else if (!isBrandHelpCenterEnabled(fetchedBrand)) { await brandInDb?.revokeHelpCenterPermissions(); } }