Skip to content

Commit

Permalink
feat(mobile-messaging): add new fields to Message type and new method…
Browse files Browse the repository at this point in the history
… to display chat view (#3531)

Co-authored-by: Konstantin Latypov <Konstantin.Latypov@infobip.com>
  • Loading branch information
kostap13 and Konstantin Latypov committed Oct 16, 2020
1 parent 7b0195b commit 14ec32b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/@ionic-native/plugins/mobile-messaging/index.ts
Expand Up @@ -129,13 +129,24 @@ 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 {
code: string;
message: string;
}

export interface ChatConfig {
ios?: {
showModally: boolean;
};
}

export class DefaultMessageStorage {
@Cordova({ sync: true })
find(messageId: string, callback: (message: Message) => void) {
Expand Down Expand Up @@ -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<any> {
return;
}
}

0 comments on commit 14ec32b

Please sign in to comment.