diff --git a/android/src/main/java/space/serenity/mati/capacitor/MatiCapacitorPlugin.java b/android/src/main/java/space/serenity/mati/capacitor/MatiCapacitorPlugin.java index 284c420..089bcbb 100644 --- a/android/src/main/java/space/serenity/mati/capacitor/MatiCapacitorPlugin.java +++ b/android/src/main/java/space/serenity/mati/capacitor/MatiCapacitorPlugin.java @@ -33,6 +33,7 @@ public void run() { final String clientId = call.getString("clientId"); final String flowId = call.getString("flowId"); final JSONObject metadata = call.getObject("metadata", null); + metadata.put("sdkType", "capacitor"); Intent intent = new Intent(bridge.getActivity(), DataPrefetchActivity.class); diff --git a/ios/Plugin/Plugin.swift b/ios/Plugin/Plugin.swift index edfc62a..464e790 100644 --- a/ios/Plugin/Plugin.swift +++ b/ios/Plugin/Plugin.swift @@ -12,9 +12,11 @@ public class MatiCapacitorPlugin: CAPPlugin { @objc func showMatiFlow(_ call: CAPPluginCall) { DispatchQueue.main.async { [weak self] in guard let self = self else { return } + let metadata = call.getObject("metadata") ?? [:] + metadata["sdk_type"] = "ios_capacitor" Mati.shared.showMatiFlow(clientId: call.getString("clientId") ?? "", flowId: call.getString("flowId") ?? "", - metadata: call.getObject("metadata") ?? nil) + metadata: ) MatiButtonResult.shared.delegate = self call.success() } diff --git a/package.json b/package.json index c2a62a4..d50e963 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aposnovmati/mati-capacitor-plugin", - "version": "2.3.0", + "version": "2.3.1", "description": "Capacitor plugin for MatiSDK", "main": "dist/plugin.js", "module": "dist/esm/index.js",