Age | Commit message (Collapse) | Author |
|
See https://www.qt.io/blog/whats-new-in-qmetatype-qvariant#qmetatype-knows-your-properties-and-methods-types
|
|
This is an adjustment to the earlier fix of #471: if a join is
immediately followed by a leave (e.g. from another client/bot - you
can't do it programmatically from libQuotient) the sync may bring the
room already in the Leave state; therefore `joinRoom` should not
impose the state but rather ask `provideRoom` to create a `Join` room -
just as it's designed when passed an empty `joinState`.
|
|
An alternative implementation of #463 (and thanks to Carl for spotting
the original problem).
|
|
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
|
|
|
|
After going through all the files and the history of commits on them
it was clear that some copyright statements are obsolete (the code has
been overwritten since) and some are missing. This commit tries best to
remedy that, along with adding SPDX tags where they were still not used.
Also, a minimal SPDX convention is documented for further contributions.
Closes #426.
|
|
Port existing copyright statement to reuse using licensedigger
|
|
See #437 for the discussion.
|
|
To be very clear what this function checks. See also #437.
|
|
So just reset the base URL and return, with no error signals.
(cherry picked from commit be00308ad67286b45912202750fe49fb87f16e4a)
|
|
...because finished() includes abandoning and should only be relevant
when lifecycle issues are involved.
(cherry picked from commit 90d41b697af39253483d9bcca4e57b11d2197112)
|
|
|
|
1. resolveServer() now emits homeserverChanged() even when there's no
.well-known file found.
2. checkAndConnect() entirely removed from the header file.
3. Sunny-day scenario for assumeIdentity() is now asynchronous,
triggering a call to /whoami to double-check the user.
4. LoginFlow aliases is moved out from LoginFlows to Quotient namespace.
|
|
Notably, recommend using loginFlowsChanged() rather than
homeserverChanged() to detect when a Connection object is ready for
a login sequence. Related: #427.
|
|
|
|
(cherry picked from commit 0a2acd750a4155969092be674ed3dd9a71b2354f)
|
|
Part of the fix for #421.
(cherry picked from commit 104356d945671762af23e346f7898a3208770d97)
|
|
|
|
May lead to new crashes due to nullptr returned from Connection::user()
on more utterly invalid content from the wire that the library still
doesn't properly invalidate. This has long been quite a good case for
exceptions, or another error-handling framework: Connection::user() can
return nullptr either when out of memory or when the id is invalid or
empty, and other places are likely to treat invalid ids in different
ways but probably just hope that memory exhaustion "never happens", or
try to handle it in a quite different way than an empty or invalid id.
Something to think of in 0.7.
(cherry picked from commit 3c85f049389dec3b0ee6406f0be2cfaf0089f1fe)
|
|
|
|
The Connection object has quite few uses after logging out - neither
rooms nor users under it no more represent actual situation, and the
object cannot be cleanly reused for a new login (also, the use case
for that is pretty dubious). This doesn't cover the case when
the session has been forcibly logged-out by the server (causing
loginError() to be emitted) - in that case re-authentication
is an expected flow.
|
|
|
|
Closes #314.
|
|
This reverts commit b1071cf34b86685c3cdb5004d6112881966a7ce6. Passing
-1 to sync() and, respectively, to SyncJob does not add any timeout;
however, careful reading of the spec reveals that the default value
for the timeout (0) means to return as soon as possible, not as late
as possible. As a consequence, syncLoop() without parameters initiates
a sync polling frenzy, with the client sending a new request as soon as
the previous returns, while the server returns the request as soon as
it practically can, not as soon as another event for the client comes
around.
To fix this, the default value for syncLoop() is changed to 30 seconds.
The recently added msecBetween parameter is abolished; we really don't
want to steer people to classic polling from long polling.
|
|
|
|
As it's observed now, Synapse responds almost immediately on /sync
requests - even if there are no events to return. This downgrades
long-polling to simply polling, and since clients don't expect it,
polling loops become pretty violent. To alleviate that somehow,
syncLoop now accepts the second parameter, msecBetween (500 msecs
by default), to configure waiting between the previous sync response
and the next sync request. This is only for syncLoop();
Connection::sync() fires instantly, as before.
|
|
|
|
Qt 5.15 deprecates binary JSON format in favour of CBOR now used as
a backend for its JSON classes.
|
|
|
|
No functional changes here.
|
|
This is to prevent the jobs from several
resolveServer() / setHomeserver() invocations running in parallel.
|
|
|
|
connectToServer() is left for compatibility but deprecated.
|
|
The code is really defensive now, making sure there's exactly one slash
between the base path and the endpoint. It's still very conservative
about the path composition otherwise (no normalisation etc.).
|
|
(Mostly) fixes #397. Fixes #398. If there's a need to reparent the job
to some other object, it should now be done after callApi()/run() call
(not that there were many touch points before that moment, anyway).
Collateral damage: job-starting methods are no more const (but that
didn't belong them anyway, too).
|
|
Also: use 4-arg connect() to make sure lambdas are disconnected
if the connection is gone.
|
|
|
|
The method grew large and a bit unwieldy over the years.
|
|
|
|
fixing msc2432
|
|
The response in the web browser is quite barebone, just enough
to give feedback that things are alright. Closes #386. Closes #388.
|
|
|
|
|
|
The flows themselves are not facilitated in any way (yet).
|
|
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
|
|
|
|
device_one_time_keys_count
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
|
|
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
|
|
|
|
* BaseJob::initiate() now calls ConnectionData::submit()
without relying on Connection to do that
* ConnectionData::submit() is now the only site where a job enters
Pending state
* No more shortcuts to BaseJob::sendRequest(), even retries are sent
through the ConnectionData submission queue
* Additional validation in BaseJob::initiate() that the request data
device is actually open (because QtNetwork API officially
requires that, even if you can get away passing a closed QBuffer
to it)
|