Age | Commit message (Collapse) | Author |
|
The latest GTAD no more emits public_rooms_chunk.h
(public_rooms_response.h already has the same definition), and skips on
PublicRoomsResponse structure that is never used.
|
|
|
|
|
|
This reimplements #558 in a more reliable way. Deconstruction of
AccountRegistry may (or may not, yay for static initialisation) occur
after deconstruction of QCoreApplication, in which case an attempt
to determine the directory for the state fails because it depends on
the application object existence.
|
|
Add GTAD as a submodule
|
|
Also: make all cloning for update-api shallow, for optimisation.
|
|
Code generation in libQuotient is pretty sensitive to GTAD version
(or even a particular commit at times); so it makes sense to have GTAD
as a submodule in order to control the revision CI uses.
(amended with the GTAD commit that uses the right yaml-cpp commit)
|
|
This only updates 3 files affected by the change in the previous commit.
|
|
Also: drop inlining PublicRoomResponse by the name because it's already
inlined by $ref before that. This configuration needs the latest GTAD
(revision 51c53ed3) to work correctly; earlier GTAD will produce FTBFS
code.
|
|
|
|
|
|
deferring until sending event
|
|
|
|
|
|
|
|
|
|
|
|
There was a fairly nasty change where `from` parameter in /messages
became optional and that led to two QString parameters (`from` and `dir)
switching positions. Because they have the same type, the problem only
shows at runtime. This commit fixes Room::getPreviousContent() to pass
the parameters at right positions; client code won't feel anything
(unless it uses GetRoomEventsJob directly).
|
|
This is mainly to plug the definition of a string-to-variant map
for one-time keys (see
https://spec.matrix.org/v1.2/client-server-api/#key-algorithms) into
the CS API generated code (see the "shortcut OneTimeKeys" commit for
gtad.yaml); but along with it came considerable streamlining of code
in qolmaccount.cpp. Using std::variant to store that map also warranted
converters.h to gain support for that type (even wider than toJson()
that is already in dev - a non-trivial merge from dev is in order).
|
|
|
|
This requires OneTimeKeys in keys.yaml to be marked as such (done in
quotient-im/matrix-spec but it's not there in matrix-org/matrix-spec).
|
|
Also: use quotient-im/matrix-spec main branch again, now that it has
adjusted definitions; drop un(der)used partials
|
|
|
|
On Debug builds this would lead to an assertion failure inside Qt.
|
|
|
|
QtKeychain master suffers from
https://github.com/frankosterfeld/qtkeychain/issues/213.
|
|
|
|
...not before.
|
|
Load and store accounts in the keychain
|
|
Also fix a leftover data/ prefix in adjust-config.sh
|
|
|
|
|
|
Mainly the change is about eliminating the checks for an exact number
of key-value pairs inside `one_time_key_counts` - these checks started
failing with new Synapse throwing `signed_curve25519: 0` into this dict.
|
|
run-tests.sh now uses the latest version of Synapse and has less
repetitive code; adjust-config.sh moved to autotests/ (it had nothing
specific to CI, after all), works with the newest Synapse (that has
an additional enable_registration_without_verification safeguard) and
no more depends on the config directory being called "data" but rather
should be called from inside that directory (for the case when it is
used separately from run-tests.sh and the config directory is not
called "data").
|
|
|
|
Cleanup and refactoring
|
|
|
|
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
|
|
Functions (Room::Private::)createOlmSession, payloadForUserDevice
and sendRoomKeyToDevices don't have a lot to do with the given Room
object but deal with quite a few things stored in Connection. This
commit moves them to Connection::Private, exposing
sendSessionKeyToDevices (the new name for sendRoomKeyToDevices) in
Connection so that Room could call it from Room::P::sendMegolmSession().
While moving these over, a few additional things were adjusted:
- more functions marked as const
- a few functions could be moved now from Connection
to Connection::Private
- false slots in Connection (such as picklingMode) are moved out of
the slots block
- keys.yml in Matrix CS API definitions has been adjusted to match
the real structure of `/claim` response (see quotient-im/matrix-spec
repo); csapi/keys.h has been regenerated accordingly.
|
|
Notably, replace a multi-level hash map with QMultiHash and factor out
Room::P::createOlmSession().
|
|
|
|
|
|
These are not operations on EncryptedFileMetadata but rather on
a combination of EncryptedFileMetadata and ciphertext. If C++ had
multimethods these could be bound to such a combination.
|
|
|
|
Besides having a misleading name (and it goes back to the spec),
EncryptedFile under `file` key preempts the `url` (or `thumbnail_url`)
string value so only one of the two should exist. This is a case for
using std::variant<> - despite its clumsy syntax, it can actually
simplify and streamline code when all the necessary bits are in place
(such as conversion to JSON and getting the common piece - the URL -
out of it). This commit replaces `FileInfo::url` and `FileInfo::file`
with a common field `source` of type `FileSourceInfo` that is an alias
for a variant type covering both underlying types; and `url()` is
reintroduced as a function instead, to allow simplified access
to whichever URL is available inside the variant.
Oh, and EncryptedFile is EncryptedFileMetadata now, to clarify that it
does not represent the file payload itself but rather the data necessary
to obtain that payload.
|
|
|
|
|
|
|
|
|
|
Truncate ciphertext buffer to actual size during file encryption
|