Age | Commit message (Collapse) | Author |
|
...meaning - errors from it should not throw up at a user, who has no
clue (they still should go to logs for investigation).
|
|
|
|
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.
|
|
For matrix-doc, specifically, it is master (5cb4b086) merged with
https://github.com/matrix-org/matrix-doc/pull/2518.
|
|
The two main cases for this header file are:
* namespace QMatrixClient = Quotient should occur exactly once,
to respect ODR.
* Q_NAMESPACE for namespace Quotient (to enable Q_ENUM_NS, particularly)
must be defined exactly once, for the same reason.
|
|
|
|
isLoggedIn() is just a wrapper around Connection::accessToken() that
returns whether it's not empty. Now, Connection::accessToken() and
Connection::logout() are changed in such a way that if there's
a logout job ongoing Connection::accessToken() will return an empty
value even though the access token is still stored in ConnectionData.
This gives a hint to the rest of Connection and to the client code
that the user is not quite authenticated anymore. Finally, syncLoop()
and sync() have been altered to check isLoggedIn() before proceeding
with their network request.
|
|
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.
|
|
|
|
|
|
TooManyRequests can come without a payload, apparently.
|
|
The warning has been that it is declared as a friend but not exactly
in namespace Quotient (though all compilers still could find and link it
but only as long as it is defined in the namespace). Now instead of
being declared as a friend it's just declared in the namespace :)
|
|
Closes #406.
|
|
[ci skip]
|
|
[skip ci]
|
|
Store JSON response in BaseJob + tweaks to the generated code
|
|
|
|
|
|
Fixes a compilation warning that Private is a struct in one place and
a class in another.
|
|
|
|
Qt 5.12+ always optimise QRegularExpression on first usage.
|
|
* JSON response is stored internally in BaseJob, rather than passed
around virtual response handlers. This allow to lazily deserialise
parts of the JSON response when the client calls for them instead of
deserialising upon arrival and storing POD pieces. This is
incompatible with the current generated code, so temporarily FTBFS.
* BaseJob::loadFromJson() and BaseJob::takeFromJson() have been added
to facilitate picking parts of the result as described above
in derived job classes.
* BaseJob::jsonData(), BaseJob::jsonItems() and (protected)
BaseJob::reply() for direct access to the response in its various
forms.
* To further eliminate boilerplate code in generated job classes,
a group of *ExpectedKeys() methods has been added - this allows to
reflect the API definition of required response keys in a more
"declarative" way, delegating validation to BaseJob.
* parseReply() and parseJson() pair turns to singular prepareResult().
Thanks to all the changes above, in most cases it will not need
overriding, unlike before.
* BaseJob::Private::parseJson() is introduced, to wrap
QJsonDocument::parseJson() into something less verbose. This serves
a completely different purpose to the former BaseJob::parseJson().
* BaseJob::doCheckReply() takes the place, and the name, of
checkReply().
|
|
What's needed for a thumbnail is normally "scale", not "crop"
(as these are defined in The Spec).
|
|
|
|
operator+() is no more wanted with iterators on associative containers.
|
|
Qt 5.15 deprecates binary JSON format in favour of CBOR now used as
a backend for its JSON classes.
|
|
|
|
All GTAD-related files (gtad.yaml and templates) from now live in their
dedicated gtad/ directory - this helps against removing them
accidentally along with the rest of the generated files. The format
to list generated files in gtad.yaml has changed a bit before
GTAD 0.7 beta2; gtad.yaml in this commit conforms to the new structure.
|
|
parseJsonDocument() will come later.
|
|
Qt 5.15 renamed HTTP2AllowedAttribute to Http2AllowedAttribute,
deprecating the old spelling.
|
|
No functional changes either.
|
|
No functional changes here.
|
|
|
|
|
|
No functional changes.
|
|
That means much more readable templates thanks to GTAD 0.7 in turn using
the upgrade Mustache engine.
|
|
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.).
|
|
Fixes #403.
|
|
|
|
Pulled from Quaternion code.
|
|
|
|
This can be handy to pass the replaced status to QML.
|
|
Due to a missing return statement, a retry with auth case led to the job
being finished and pending at the same time, with no good consequences.
|
|
When a message is redacted it has no sender. If it happens to be
in the bulkhead, Quotient tries to promote a read marker over it and
fails on being unable to resolve the author.
|
|
Longer running on RHEL/CentOS 8 leads to crashes that no more occur
with disabled pipelining.
|
|
|
|
This is a Quotient part of #328 fix; QtOlm part is pending.
|