mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
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:
parent
7b0195bdf4
commit
14ec32b83c
@ -129,6 +129,11 @@ export interface Message {
|
|||||||
vibrate?: boolean; // Android only
|
vibrate?: boolean; // Android only
|
||||||
icon?: string; // Android only
|
icon?: string; // Android only
|
||||||
category?: string; // Android only
|
category?: string; // Android only
|
||||||
|
chat?: string;
|
||||||
|
browserUrl?: string;
|
||||||
|
deeplink?: string;
|
||||||
|
webViewUrl?: string;
|
||||||
|
inAppDismissTitle?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MobileMessagingError {
|
export interface MobileMessagingError {
|
||||||
@ -136,6 +141,12 @@ export interface MobileMessagingError {
|
|||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ChatConfig {
|
||||||
|
ios?: {
|
||||||
|
showModally: boolean;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export class DefaultMessageStorage {
|
export class DefaultMessageStorage {
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
find(messageId: string, callback: (message: Message) => void) {
|
find(messageId: string, callback: (message: Message) => void) {
|
||||||
@ -437,4 +448,15 @@ export class MobileMessaging extends IonicNativePlugin {
|
|||||||
defaultMessageStorage(): DefaultMessageStorage | undefined {
|
defaultMessageStorage(): DefaultMessageStorage | undefined {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays chat view.
|
||||||
|
*
|
||||||
|
* @name showChat
|
||||||
|
* @param {ChatConfig} chat config
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
showChat(config?: ChatConfig): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user