From 14ec32b83c603fc5a079eabf794b7dadce867358 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 16 Oct 2020 20:20:20 +0300 Subject: [PATCH] feat(mobile-messaging): add new fields to Message type and new method to display chat view (#3531) Co-authored-by: Konstantin Latypov --- .../plugins/mobile-messaging/index.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/@ionic-native/plugins/mobile-messaging/index.ts b/src/@ionic-native/plugins/mobile-messaging/index.ts index 7bff2edd4a..f783e7081a 100644 --- a/src/@ionic-native/plugins/mobile-messaging/index.ts +++ b/src/@ionic-native/plugins/mobile-messaging/index.ts @@ -129,6 +129,11 @@ export interface Message { vibrate?: boolean; // Android only icon?: string; // Android only category?: string; // Android only + chat?: string; + browserUrl?: string; + deeplink?: string; + webViewUrl?: string; + inAppDismissTitle?: string; } export interface MobileMessagingError { @@ -136,6 +141,12 @@ export interface MobileMessagingError { message: string; } +export interface ChatConfig { + ios?: { + showModally: boolean; + }; +} + export class DefaultMessageStorage { @Cordova({ sync: true }) find(messageId: string, callback: (message: Message) => void) { @@ -437,4 +448,15 @@ export class MobileMessaging extends IonicNativePlugin { defaultMessageStorage(): DefaultMessageStorage | undefined { return; } + + /** + * Displays chat view. + * + * @name showChat + * @param {ChatConfig} chat config + */ + @Cordova() + showChat(config?: ChatConfig): Promise { + return; + } }