aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
AgeCommit message (Collapse)Author
2021-12-01Emit needsSave when requiredTobias Fella
2021-12-01Remove unrelated changesTobias Fella
2021-12-01Update the OlmAccountPickle in the accountsettings when the olmaccountTobias Fella
changes
2021-12-01Uncomment some stuffCarl Schwan
2021-12-01ThingsTobias Fella
2021-12-01Cleanup and Refactor EncryptionManagerTobias Fella
2021-12-01Fix compilation without E2EETobias Fella
2021-12-01More fixesTobias Fella
2021-12-01Query for keys less and actually load users from cacheTobias Fella
2021-12-01Cache deviceslist across restartsTobias Fella
2021-12-01Fix signature verification logicTobias Fella
2021-12-01Verify deviceKeys signaturesTobias Fella
2021-12-01Update tracked users list when new user joins encrypted roomTobias Fella
2021-12-01Start tracking user's devices when a a room starts being encryptedTobias Fella
2021-12-01Actually load devices from sync data and filter relevant usersTobias Fella
2021-12-01Clear current query job when it finishedTobias Fella
2021-12-01Start implementing device key trackingTobias Fella
2021-12-01Upload device keys when creating a new olm accountTobias Fella
2021-12-01Uncomment some stuffCarl Schwan
2021-12-01Make sure that only one upload is runningTobias Fella
2021-12-01Upload one-time keys when their count is lowTobias Fella
2021-12-01Fix everythingCarl Schwan
2021-12-01sslCarl Schwan
2021-12-01More testsCarl Schwan
2021-12-01E2EE: initial port to internal olm wrapperAlexey Andreyev
Remove qtolm git module. Update CMakeLists.txt. Rename olm to crypto subdir to prevent disambiguation. Rename internal files accordingly. Comment out not ported E2EE API usage.
2021-11-19Make enum values logging more terse()Alexey Rusakov
By default enum class values are logged along with the qualifier; this may or may not be desirable in a given setting. For JoinState(s) and Membership(Mask) operator<< was overloaded to implicitly suppress qualification; however, this is both overly sweeping and uses Qt's internal API for the backend. Instead, a new QDebug manipulator, terse(), is introduced, that does the same as those operator<< overloads but on a per-invocation basis. This makes it slightly more verbose to log enums but makes the QDebug reconfiguration explicit and doesn't require to produce new overloads every time a new enum ends up in logs. And it's built entirely on the published Qt API, reusing the QDebugManip framework that Quotient already has. Also: operator<<(QDebug, QDebugManip) has been moved out of the namespace to fix lookup issues when there's no prior `using namespace Quotient`.
2021-11-08Q_DISABLE_MOVE/COPY_MOVE; QT_IGNORE_DEPRECATIONSAlexey Rusakov
DISABLE_MOVE is no more; instead, the library provides Q_DISABLE_MOVE (and also Q_DISABLE_COPY_MOVE while at it) for Qt pre-5.13 that don't have it yet. Same for QT_IGNORE_DEPRECATIONS - it only arrived in 5.15 but all the building pieces existed prior so libQuotient has it regardless of the Qt version used for building.
2021-10-13Connection::resolveServer(): don't connect to loginFlowsJobAlexey Rusakov
Checking whether any login flows are available is a good enough measure of the homeserver actual workability. Closes #515.
2021-10-05Connection: fix C++20 warningsAlexey Rusakov
2021-10-05BaseJob::StatusCode: officially deprecate most *Error enumeratorsAlexey Rusakov
2021-09-12Connection: update AccountRegistryAlexey Rusakov
Clients don't need to do it themselves.
2021-09-10Move URL creation to Room/Connection; use query instead of fragmentAlexey Rusakov
The query is easier to manipulate; and the original mxc URL is not used for the real network request anyway.
2021-08-22Drop other stuff deprecated pre- or early 0.6Alexey Rusakov
BaseJob: StatusCode::JsonParseError Connection: resolved() and reconnected() signals; roomMap(); postReceipt() User: bridged() and rawName() ConnectionData: setHost() and setPort() StateEventBase: prev_content()
2021-07-18MembershipType -> Membership, also used for JoinStateAlexey Rusakov
Instead of being defined independently, JoinState now uses values from the Membership enumeration (former MemberEventContent::MembershipType) that was moved to quotient_common.h for that purpose. Both enumerations gained a Q_FLAG_NS decoration and operator<< overrides that strip "Quotient::" prefix when dumping member/join state values to the log - obviating toCString(JoinState) along the way. Quotient::MembershipType alias is deprecated from now.
2021-06-12connection.cpp: erase_if -> remove_ifAlexey Rusakov
erase_if is now also provided by Qt; doing pretty much the same thing, the Qt implementation only returns the number of removed entries instead of returning a collection of them, however. Worth admitting at this point that the function in connection.cpp has never had the semantics of STL's erase_if() and doesn't quite have the semantics of remove_if() either; but at least it's closer to remove_if().
2021-06-12Adjust to new moc/QMetaType requirementsAlexey Rusakov
See https://www.qt.io/blog/whats-new-in-qmetatype-qvariant#qmetatype-knows-your-properties-and-methods-types
2021-06-07Connection::joinRoom() shouldn't enforce room stateAlexey Rusakov
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`.
2021-05-09Fix joinedRoom signal not being emitted in some casesAlexey Rusakov
An alternative implementation of #463 (and thanks to Carl for spotting the original problem).
2021-02-26Apply suggestionCarl Schwan
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2021-02-26Add public method to determine if we can change the user passwordCarl Schwan
2021-01-16Updated copyright statements upon Git auditKitsune Ral
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.
2021-01-15Merge pull request #428 from ognarb/licensingKitsune Ral
Port existing copyright statement to reuse using licensedigger
2021-01-07Connection: don't explicitly reset QPointersKitsune Ral
See #437 for the discussion.
2021-01-07isJobRunning() -> isJobPending()Kitsune Ral
To be very clear what this function checks. See also #437.
2021-01-07Connection::resolveServer: abandon is not a failureKitsune Ral
So just reset the base URL and return, with no error signals. (cherry picked from commit be00308ad67286b45912202750fe49fb87f16e4a)
2021-01-07Prefer connecting to BaseJob::result(), not finished()Kitsune Ral
...because finished() includes abandoning and should only be relevant when lifecycle issues are involved. (cherry picked from commit 90d41b697af39253483d9bcca4e57b11d2197112)
2020-12-28Connection: fix FTBFS with Quotient_E2EE_ENABLEDKitsune Ral
2020-12-28Connection: refactor the resolve/login codeKitsune Ral
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.
2020-12-28More comments/documentationKitsune Ral
Notably, recommend using loginFlowsChanged() rather than homeserverChanged() to detect when a Connection object is ready for a login sequence. Related: #427.
2020-12-26Port existing copyright statement to reuse using licensediggerCarl Schwan