aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-12Merge branch 'kitsune/more-gtad-fixes' into devAlexey Rusakov
2022-06-12Reduce the number of CI jobsAlexey Rusakov
It takes well over an hour to build the whole lineup for now; while the single right fix for that is making quotest capable of running in parallel, a few GCC jobs can be safely dropped for now (and we'll see if they should be brought back when parallel quotest unleashes the CI).
2022-06-12Require CMake 3.16; extend C++20 to headersAlexey Rusakov
...meaning, clients have to compile in C++20 mode too from now.
2022-06-12CI: No more allow failure of update-api jobsAlexey Rusakov
2022-06-11Regenerate API files using latest matrix-specAlexey Rusakov
New: - refresh tokens support (changes in login.* and registration.*; RefreshJob); - GetRelatingEvents[WithRelType[AndEventType]]Job Changed space_hierarchy.*: - childrenState is of type StateEvents now; limit and maxDepth are (omittable) integers, not doubles. - no more unused `stripped_state.h` file inclusion.
2022-06-11gtad: update submodule (again)Alexey Rusakov
2022-06-11gtad.yaml: Drop deprecated home_server field from login/registerAlexey Rusakov
2022-06-11gtad.yaml: Treat child rooms state as eventsAlexey Rusakov
2022-06-11Regenerate API filesAlexey Rusakov
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.
2022-06-11gtad: update submoduleAlexey Rusakov
2022-06-11gtad.yaml: more clarifying commentsAlexey Rusakov
2022-06-08Save connection state while QCoreApplication is still thereAlexey Rusakov
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.
2022-06-07Merge pull request #561 from quotient-im/kitsune/gtad-submoduleAlexey Rusakov
Add GTAD as a submodule
2022-06-07CI: use GTAD submoduleAlexey Rusakov
Also: make all cloning for update-api shallow, for optimisation.
2022-06-07Add GTAD as a submoduleAlexey Rusakov
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)
2022-06-06Regenerate API filesAlexey Rusakov
This only updates 3 files affected by the change in the previous commit.
2022-06-06GTAD: inline public_rooms_chunk.yamlAlexey Rusakov
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.
2022-06-04Address Sonar warningsAlexey Rusakov
2022-06-02Merge pull request #560 from TobiasFella/createnewsessionwhenuserleavesAlexey Rusakov
2022-06-01Immediately create a new megolm session when user leaves instead ofTobias Fella
deferring until sending event
2022-06-01Merge pull request #559 from TobiasFella/removeaccountsloadingAlexey Rusakov
2022-06-01#554: Fix update-api jobsAlexey Rusakov
2022-06-01Fix FTBFS after the mergeAlexey Rusakov
2022-05-31Remove accounts from accountsLoading when they're no longer loadingTobias Fella
2022-05-31Merge branch 'dev' into update-api-updateAlexey Rusakov
2022-05-31Fix Room::getPreviousContent() to match new CS APIAlexey Rusakov
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).
2022-05-31Tweak QOlmAccount and data structures aroundAlexey Rusakov
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).
2022-05-31Regenerate API files (FTBFS; see the next commit)Alexey Rusakov
2022-05-31gtad.yaml (again): shortcut OneTimeKeysAlexey Rusakov
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).
2022-05-31Update gtad.yml to match v3 API definitionsAlexey Rusakov
Also: use quotient-im/matrix-spec main branch again, now that it has adjusted definitions; drop un(der)used partials
2022-05-31#558: Save connection state when destructing accountregistryAlexey Rusakov
2022-05-31AccountRegistry: fix dropping an inexistent ConnectionAlexey Rusakov
On Debug builds this would lead to an assertion failure inside Qt.
2022-05-31Save connection state when destructing accountregistryTobias Fella
2022-05-30CI: Build with QtKeychain 0.13.2Alexey Rusakov
QtKeychain master suffers from https://github.com/frankosterfeld/qtkeychain/issues/213.
2022-05-30Cleanup and reformattingAlexey Rusakov
2022-05-30Emit loggedOut() after the access token is goneAlexey Rusakov
...not before.
2022-05-30Merge pull request #555 from TobiasFella/accountskeychainAlexey Rusakov
Load and store accounts in the keychain
2022-05-30run-tests.sh: fix weird CI failure on Linux/ClangAlexey Rusakov
Also fix a leftover data/ prefix in adjust-config.sh
2022-05-29Also reemit resolveErrorTobias Fella
2022-05-29Merge #557: Refresh and organise run-tests.sh/adjust-config.shAlexey Rusakov
2022-05-29TestOlmAccount: fix testsAlexey Rusakov
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.
2022-05-29Refresh and organise run-tests.sh/adjust-config.shAlexey Rusakov
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").
2022-05-29Error handlingTobias Fella
2022-05-29Merge pull request #556 from quotient-im/kitsune/fixesAlexey Rusakov
Cleanup and refactoring
2022-05-29Fix CITobias Fella
2022-05-29Apply suggestions from code reviewTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2022-05-29Move some Meg/Olm session logic from Room::Private to Connection::PrivateAlexey Rusakov
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.
2022-05-29Refactor creation of Megolm sessions in RoomAlexey Rusakov
Notably, replace a multi-level hash map with QMultiHash and factor out Room::P::createOlmSession().
2022-05-29Cleanup and address Sonar warningsAlexey Rusakov
2022-05-29DownloadFileJob: refactor file decryptionAlexey Rusakov