feat(mobile-messaging): add new fields to Message type and new method to display chat view (#3531)

Co-authored-by: Konstantin Latypov <Konstantin.Latypov@infobip.com>
This commit is contained in:
Konstantin 2020-10-16 20:20:20 +03:00 committed by GitHub
parent 7b0195bdf4
commit 14ec32b83c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<any> {
return;
}
}