Skip to content

Commit

Permalink
Proposed fix to allow the alias() call to succeede.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcstoufer committed Nov 24, 2015
1 parent 117e082 commit 753d614
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Pod/Classes/Internal/SEGSegmentIntegration.m
Original file line number Diff line number Diff line change
@@ -362,7 +362,11 @@ - (void)enqueueAction:(NSString *)action dictionary:(NSMutableDictionary *)paylo
[self dispatchBackground:^{
// attach userId and anonymousId inside the dispatch_async in case
// they've changed (see identify function)
[payload setValue:self.userId forKey:@"userId"];

// Do not override the userId for an 'alias' action. This value is set in [alias:] already.
if ( ![action isEqualToString:@"alias"]) {
[payload setValue:self.userId forKey:@"userId"];
}
[payload setValue:self.anonymousId forKey:@"anonymousId"];

[payload setValue:[self integrationsDictionary:integrations] forKey:@"integrations"];

0 comments on commit 753d614

Please sign in to comment.