capacitor-event-bird 0.0.9 → 0.0.10
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.
|
@@ -17,6 +17,7 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
17
17
|
|
|
18
18
|
@objc func echo(_ call: CAPPluginCall) {
|
|
19
19
|
if let token = savedToken {
|
|
20
|
+
print("[Native] JS called echo, passing the token.")
|
|
20
21
|
call.resolve(["value": token])
|
|
21
22
|
} else {
|
|
22
23
|
print("[Native] JS called echo, but token not ready. Queuing callback.")
|
|
@@ -35,13 +36,10 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
35
36
|
pendingEchoCalls.removeAll()
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
@objc public func removeAuthToken() {
|
|
39
|
-
print("[Native] Removing auth token in plugin")
|
|
40
|
-
self.savedToken = nil
|
|
41
|
-
}
|
|
42
|
-
|
|
43
39
|
@objc func logout(_ call: CAPPluginCall) {
|
|
44
40
|
NotificationCenter.default.post(name: Notification.Name("NativeLogoutEvent"), object: nil)
|
|
41
|
+
savedToken = nil
|
|
42
|
+
pendingEchoCalls.removeAll()
|
|
45
43
|
call.resolve()
|
|
46
44
|
}
|
|
47
45
|
}
|