omikit-plugin 3.2.44 → 3.2.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -625,28 +625,28 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
625
625
  }
626
626
 
627
627
  @ReactMethod
628
- fun getUserInfo(phone: Any, promise: Promise) {
628
+ fun getUserInfo(phone: String, promise: Promise) {
629
629
  mainScope.launch {
630
- var callResult: Any? = null
631
- withContext(Dispatchers.Default) {
632
- try {
633
- callResult = OmiClient.getInstance(reactApplicationContext!!).getUserInfo(phone as String)
634
- } catch (_: Throwable) {
630
+ var callResult: Any? = null
631
+ withContext(Dispatchers.Default) {
632
+ try {
633
+ callResult = OmiClient.getInstance(reactApplicationContext!!).getUserInfo(phone)
634
+ } catch (_: Throwable) {
635
+ }
636
+ }
637
+ if (callResult != null && callResult is Map<*, *>) {
638
+ val call = callResult as Map<*, *>
639
+ val map: WritableMap = WritableNativeMap()
640
+ map.putString("extension", call["extension"] as String?)
641
+ map.putString("uuid", call["uuid"] as String?)
642
+ map.putString("full_name", call["full_name"] as String?)
643
+ map.putString("avatar_url", call["avatar_url"] as String?)
644
+ promise.resolve(map)
645
+ } else {
646
+ promise.resolve(null)
635
647
  }
636
- }
637
- if (callResult != null && callResult is Map<*, *>) {
638
- val call = callResult as Map<*, *>
639
- val map: WritableMap = WritableNativeMap()
640
- map.putString("extension", call["extension"] as String?)
641
- map.putString("uuid", call["uuid"] as String?)
642
- map.putString("full_name", call["full_name"] as String?)
643
- map.putString("avatar_url", call["avatar_url"] as String?)
644
- promise.resolve(map)
645
- } else {
646
- promise.resolve(null);
647
- }
648
648
  }
649
- }
649
+ }
650
650
 
651
651
  @ReactMethod
652
652
  fun getAudio(promise: Promise) {
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  #import <Foundation/Foundation.h>
9
- #import "omikit_plugin-Swift.h"
9
+ #import <omikit_plugin-Swift.h>
10
10
 
11
11
  @implementation OmikitNotification : NSObject
12
12
  + (void)didRecieve:(NSDictionary*) userInfo{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omikit-plugin",
3
- "version": "3.2.44",
3
+ "version": "3.2.46",
4
4
  "description": "Omikit Plugin by ViHAT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",