Age | Commit message (Collapse) | Author |
|
Only API-preserving changes are included in this branch (0.7 will have
all changes).
|
|
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).
|
|
A few months ago 3c85f049 introduced validation of user ids but the rest
of the library code wasn't updated to the fact that Connection::user()
may quite legitimately (if not routinely) return nullptr, leading to
crashes particularaly when malformed ids come from the wire. This commit
adds necessary checks before using the value returned from user().
Closes #456.
|
|
|
|
As per the latest iteration of MSC2312, room/, user/ and event/ are
only supported for parsing and replication but not for emitting from
Matrix identifiers.
|
|
The new formatted_body was not included into new content on edit
due to badly constructed json.
(cherry picked from commit df6b2d31ec8f2f5890826719e960f450a4968f22)
|
|
With this patch it looks like:
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$another:event.com"
}
}
instead of:
"m.relates_to": {
"event_id": "$another:event.com",
"rel_type": "m.in_reply_to"
},
So it fits the specification by now.
https://matrix.org/docs/spec/client_server/r0.6.1#rich-replies
(cherry picked from commit b850edadde2299b122a5cd17da85e943430e43b7)
|
|
This avoids a corner case when a login flows job finishes (or worse,
goes for a retry) while the homeserver is (being) resolved, yielding
the Connection object in an inconsistent state to the client.
|
|
See #437 for the discussion.
(cherry picked from commit 6101971af86fdecd084759aa039b9d20a9d662a7)
|
|
So just reset the base URL and return, with no error signals.
|
|
Fixes #437.
|
|
|
|
...because finished() includes abandoning and should only be relevant
when lifecycle issues are involved.
|
|
(cherry picked from commit 0f974c0f96f29035ee766e8913504fed4a4903a5)
|
|
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.
(based on commit 6c9ff40dbd91cc4966f0ecf9ed817efc2495a2fb to master)
|
|
(cherry picked from commit 56c1db077b5da653c230432abc6c746318a77bed)
|
|
...to show the sunny-day case.
(cherry picked from commit 5d15e3b23649a54abdb3812c10f4a7d2ce07d7dd)
|
|
Usually QNetworkAccessManager expects the user to delete the replies, but when the QNetworkAccessManager itself is deleted it deletes all pending replies (https://code.woboq.org/qt5/qtbase/src/network/access/qnetworkaccessmanager.cpp.html#529).
This can lead to use-after-free crashes when d->reply is accessed. By putting the reply into a QPointer the exiting if(d->reply) checks can work properly.
(cherry picked from commit 9d854e778d8d6ef8e03e1ea74fe958675b24fd45)
|
|
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 8981c5451ac378f16d5b57d7460d053e2cbc666e)
|
|
Also: use a structured binding for better code readability.
|
|
|
|
|
|
Proxy servers may return arbitrary HTML, for one example; so don't
expect to find a valid JSON object in whatever non-empty payload
next to a non-2xx HTTP code. Fixes #421.
|
|
Part of the fix for #421.
|
|
|
|
DeleteDeviceJob requires authentication, but the JSON data is not added for DELETE requests.
Since QNetworkAccessManager::deleteResource does not support body data, we need to send a custom request.
|
|
The change in 39830496 led to prev_content becoming a fallback not only
for displaying user names but also for storing them in the internal
member map, which is really not what was intended.
|
|
Changes in e81117fb exposed a flaw in EncryptionEvent causing assertion
failure when this event is default-initialised (i.e. no encryption).
|
|
|
|
This is a usual situation when a membership type is undefined; and
the current code constructs _a lot_ of stub events by loading them from
empty JSON. So just silence those warnings for now.
|
|
This is to optimize a rather hot path creating stub events (for
member events in bigger rooms, in particular) when the event type is
known. Version 0.7 will have a completely different code based on
event content rather than event that will obviate stubs creation but
0.6.x can benefit from it.
|
|
|
|
...in one particular case, when trying to add a user to a room it's
already a member of.
|
|
Closes #412.
|
|
The first character inside the fragment should be /
|
|
|
|
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.
|
|
|
|
See https://github.com/matrix-org/matrix-doc/issues/2717
|
|
|
|
|
|
...instead of a complicated explicit code converting from JSON
to varianthash to hash.
|
|
As of 0.6.1, User::name() triggers fetching the user profile (whether
this is right is a separate question but that's the way it works with
the current library API) - displayname() should use it rather than
shortcut to d->defaultName to get results consistent with User::name().
|
|
This is a temporary workaround for
https://github.com/matrix-org/synapse/issues/8029 - note that
regenerating CS API code will lead to overwriting this. The proper fix
should be done in matrix-doc (see
https://github.com/matrix-org/matrix-doc/issues/2717).
|
|
Qt 5.15 deprecates bearer management.
|
|
|
|
5849686e introduced a new way of storing user avatars and names -
unfortunately it didn't fully cover the case of the user's default
(profile) name and avatar. This commit fixes it; in 0.6.x branch,
the fix requires a const_cast<> hack since name() and avatarObject()
invocations are used as triggers to fetch the profile. 0.7 will have
User::fetchProfile() method instead.
|
|
The most frequent occurence of IncorrectResponse so far is a proxy/CDN
failure. This is not a grave error; there's a chance that the retry will
succeed. In the worst case the job will fail after 3 identical errors
(except SyncJob that will try to get through forever - but SyncJob
failures should still be indicated in the client's UI in some
non-intrusive way).
|
|
|