File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ public class OSEventProducer<THandler>: NSObject {
3333 var subscriber : THandler ?
3434
3535 public func subscribe( _ handler: THandler ) {
36- OneSignalLog . onesignalLog ( . LL_VERBOSE, message: " OSEventProducer.subscribe() called with handler: \( handler) " )
3736 // TODO: UM do we want to synchronize on subscribers
3837 subscriber = handler // TODO: UM style, implicit or explicit self?
3938 }
Original file line number Diff line number Diff line change @@ -191,10 +191,6 @@ class OSUserExecutor {
191191 identityModel. hydrate ( identityObject)
192192 }
193193
194- // On success, check if the current user is the same as the one in the request
195- // If user has changed, don't hydrate, except for push subscription
196- let modelInStore = OneSignalUserManagerImpl . sharedInstance. identityModelStore. getModel ( key: OS_IDENTITY_MODEL_KEY)
197-
198194 // TODO: Determine how to hydrate the push subscription, which is still faulty.
199195 // Hydrate by token if sub_id exists?
200196 // Problem: a user can have multiple iOS push subscription, and perhaps missing token
@@ -214,8 +210,10 @@ class OSUserExecutor {
214210 }
215211 }
216212 }
217-
218- guard modelInStore? . modelId == identityModel. modelId else {
213+
214+ // Check if the current user is the same as the one in the request
215+ // If user has changed, don't hydrate, except for push subscription above
216+ guard OneSignalUserManagerImpl . sharedInstance. isCurrentUser ( identityModel) else {
219217 return
220218 }
221219
You can’t perform that action at this time.
0 commit comments