From 421bbf20c22133c32e1675cadefb474e906321a0 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Mon, 27 Jul 2026 22:16:33 +0200 Subject: [PATCH] feat(intercom): add suppressProactiveContent method Adds suppressProactiveContent(types) added in cordova-plugin-intercom 16.4.0, which lets apps independently suppress carousel/survey proactive content apart from setInAppMessageVisibility. --- .../plugins/intercom/index.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/@awesome-cordova-plugins/plugins/intercom/index.ts b/src/@awesome-cordova-plugins/plugins/intercom/index.ts index 8b941832f..397e86479 100644 --- a/src/@awesome-cordova-plugins/plugins/intercom/index.ts +++ b/src/@awesome-cordova-plugins/plugins/intercom/index.ts @@ -219,6 +219,17 @@ export class Intercom extends AwesomeCordovaNativePlugin { return; } + /** + * Suppress the given proactive content types, independently of `setInAppMessageVisibility`. + * @note All proactive content is visible by default; pass an empty array to unsuppress all. + * + * @param types An array of content type strings to suppress, e.g. `[IntercomPresentContentType.Carousel, IntercomPresentContentType.Survey]`. + */ + @Cordova() + suppressProactiveContent(types: IntercomPresentContentType[]): Promise { + return; + } + /** * Hide all Intercom windows that are currently displayed. * This will hide the Messenger, Help Center, Articles, and in-product messages (eg. Mobile Carousels, chats, and posts). @@ -375,8 +386,7 @@ export enum IntercomPresentContentType { } export type IntercomPresentContent = - | { id: string; type: IntercomPresentContentType } - | { ids: string[]; type: IntercomPresentContentType }; + { id: string; type: IntercomPresentContentType } | { ids: string[]; type: IntercomPresentContentType }; export interface IntercomUserAttributes { email?: string;