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

Connection::userId() is empty before authentication #670

Closed
KitsuneRal opened this issue Jun 8, 2023 · 1 comment
Closed

Connection::userId() is empty before authentication #670

KitsuneRal opened this issue Jun 8, 2023 · 1 comment
Labels
bug/fix The library doesn't work as expected wontfix No way the project can fix this anytime soon

Comments

@KitsuneRal
Copy link
Member

Describe the bug
Version 0.8 decouples Connection from AccountRegistry, with clients having to add Connection objects to their registry instance instead. However, before successful authentication Connection::userId() returns an empty value.

To Reproduce

  1. Call AccountRegistry::add() on several (two are enough) Connection objects one after another before any of them is authenticated (Connection::assumeIdentity() counts as authentication too).
  2. Observe that only the first Connection object gets added, with a warning on subsequent object(s) in the logs: "Attempt to add another connection for the same user id; skipping".

Expected behavior
Some (stable) MXID-based identification for Connection should work from the very beginning of Connection existence, so that one could add them to AccountRegistry right away. Ideally, MXID should not even change during Connection lifecycle but that's a separate story, effectively the same as #439.

Is it environment-specific?

  • libQuotient 0.8 beta
@KitsuneRal KitsuneRal added the bug/fix The library doesn't work as expected label Jun 8, 2023
KitsuneRal added a commit to quotient-im/Quaternion that referenced this issue Jul 7, 2023
KitsuneRal added a commit to quotient-im/Quaternion that referenced this issue Jul 12, 2023
This is a regression from dab20d8 - won't be needed any more once
quotient-im/libQuotient#670 is fixed.
@KitsuneRal KitsuneRal added the wontfix No way the project can fix this anytime soon label Apr 4, 2024
@KitsuneRal
Copy link
Member Author

Collapsing this into #439.

@KitsuneRal KitsuneRal closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix The library doesn't work as expected wontfix No way the project can fix this anytime soon
Projects
None yet
Development

No branches or pull requests

1 participant