Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #292 #293

Closed

Conversation

leoMehlig
Copy link
Contributor

@leoMehlig leoMehlig commented Mar 30, 2024

What kind of change does this PR introduce?

This PR fixes the bug described in #292.

  1. Adds a new test class StoredSessionTests, which includes tests to decode the previous JSON and the current.
  2. Adds a default value to identityId to make it backwards-compatible with the StoredSession in 2.4.0

What is the current behavior?

Decoding an old stored session would fail.

What is the new behavior?

Decoding an old stored session uses a default (all zeros) value for identityId

Additional context

An alternative approach would be to make identityId optional, but that requires changes elsewhere in the SDK. The upside of that approach is, that it is more explicit and would not require custom Codable code.

@leoMehlig leoMehlig marked this pull request as ready for review March 30, 2024 13:25
@leoMehlig leoMehlig requested a review from grdsdev as a code owner March 30, 2024 13:25
@grdsdev
Copy link
Collaborator

grdsdev commented Apr 1, 2024

Thanks @leoMehlig for the PR, I made a few changes to it, going to push it.

@grdsdev
Copy link
Collaborator

grdsdev commented Apr 1, 2024

Closing in favor of #294, thanks @leoMehlig

@grdsdev grdsdev closed this Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants