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

There's always place for more fixes #803

Merged
merged 11 commits into from
Sep 20, 2024
Merged

Conversation

KitsuneRal
Copy link
Member

More fixes, and I also accidentally rewrote TestOlmAccount with futures while doing the fixes.

@KitsuneRal KitsuneRal added bug/fix The library doesn't work as expected regression Something broken since the last release labels Sep 19, 2024
Copy link

sonarcloud bot commented Sep 19, 2024

The name is bad: a connection logged in via assumeIdentity() is
perfectly usable yet doesn't necessarily have login flows loaded as the
funciton implementation assumes.
Will be used in the next commit to rewrite TestOlmAccount.
In some situations Synapse takes a lot of time and sometimes even fails
to respond to a request at once; to alleviate that, most timeouts are
increased from 10 to 40 seconds, to give time for a retry. And to unify
the waiting code, Quotient::waitForFuture() is introduced that
internally uses QTest::qWaitFor() that is more lightweight than
QSignalSpy.
These APIs are practically internal; the change is meant to streamline
adding an account, assuming that both the identity and the access token
arrive to these classes at the same time (e.g. see
Connection::completeSetup()).
1. Mock connections no more use ConnectionEncryptionData::setup(), just
   initialise the object directly. There's not that much work, and it's
   entirely independent from what CED::setup() normally does.
2. Clearing the database has moved from Connection::P::loginToServer()
   to CED::setup(); the previous logic almost never worked because
   encryptionData is usually initialised asynchronously now, and even
   in the rare asynchoronous cases the clearing happened at the wrong
   moment - after the first save of the newly initialised Olm account.
Quotient/connection.h Outdated Show resolved Hide resolved
Quotient/connection.h Outdated Show resolved Hide resolved
@KitsuneRal KitsuneRal linked an issue Sep 20, 2024 that may be closed by this pull request
@KitsuneRal KitsuneRal merged commit 4a6f0bd into dev Sep 20, 2024
6 checks passed
@KitsuneRal KitsuneRal deleted the kitsune/fixes-more-fixes branch September 20, 2024 09:24
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 regression Something broken since the last release
Projects
Status: 0.9 - Done
Development

Successfully merging this pull request may close these issues.

"Missing access token" error on (too early?) user profile retrieval
2 participants