Skip to content

Commit

Permalink
Merge pull request #472 from apptentive/IOSOSX-905
Browse files Browse the repository at this point in the history
Delete JWT for logged-out conversations
  • Loading branch information
frankus authored Jul 28, 2017
2 parents 467d448 + b4dd8c5 commit 5e8d755
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ - (void)updateMetadataItems:(ApptentiveConversation *)conversation {
}

item.state = conversation.state;
item.JWT = conversation.token; // TODO: check nil for 'active' conversations
if (item.state == ApptentiveConversationStateLoggedOut) {
item.JWT = nil;
} else {
item.JWT = conversation.token;
}

if (item.state == ApptentiveConversationStateLoggedIn) {
ApptentiveAssertNotNil(conversation.encryptionKey, @"Encryption key is nil");
Expand Down

0 comments on commit 5e8d755

Please sign in to comment.