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

Document the nuances in UserId and SessionId types. #1616

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

julioromano
Copy link
Contributor

@julioromano julioromano commented Oct 20, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other : Docs

@julioromano julioromano requested a review from a team as a code owner October 20, 2023 12:03
@julioromano julioromano requested review from bmarty and removed request for a team October 20, 2023 12:03
@julioromano julioromano enabled auto-merge (squash) October 20, 2023 12:06
@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/HjZQKj

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

To add some context, SessionId is used to identify a session, and the value used is the user MatrixId. In the previous SDK we where concatenating the userId and the deviceId in the SDK to let the SDK be able to log in several times with the same user. We do not need to do that anymore, but we like to keep SessionId distinct from UserId.

The SessionId is used to identify the session, for instance when coming from a notification intent. This is preparatory work for multi session support.

@julioromano julioromano merged commit f787867 into develop Oct 20, 2023
13 of 14 checks passed
@julioromano julioromano deleted the julioromano/adddocs branch October 20, 2023 12:25
@julioromano
Copy link
Contributor Author

LGTM.

To add some context, SessionId is used to identify a session, and the value used is the user MatrixId. In the previous SDK we where concatenating the userId and the deviceId in the SDK to let the SDK be able to log in several times with the same user. We do not need to do that anymore, but we like to keep SessionId distinct from UserId.

The SessionId is used to identify the session, for instance when coming from a notification intent. This is preparatory work for multi session support.

Does this mean in the feature the semantic meaning of SessionId will change?

Right now is MXID of the current user.
In the future it might become "some string that identifies this session but might not be an MXID" ?

@bmarty
Copy link
Member

bmarty commented Oct 23, 2023

i do not think it will change, I am just giving some context here :)

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.

None yet

2 participants