aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-12-09Room: more doc-commentsKitsune Ral
2019-12-09Initialise read marker if none is found in the whole timelineKitsune Ral
Closes #361.
2019-12-09Merge branch 'kitsune-look-further-for-redactions'Kitsune Ral
2019-12-08Merge pull request #365 from quotient-im/aa13q-msc1954-drop-prev-contentKitsune Ral
MSC1954: Remove prev_content from the essential keys list
2019-12-08Room::addNewMessageEvents: search the whole sync batch for events toKitsune Ral
redact It seems that sometimes redactions may precede the unredacted events within the same sync batch.
2019-12-08ConnectionData: stop the timer on destructionKitsune Ral
...to prevent from trying to send requests after closing the connection.
2019-12-08Remove extraneous qualificationKitsune Ral
2019-12-06MSC1954: Remove prev_content from the essential keys listAlexey Andreyev
Fixes #318
2019-11-30Fix room highlighting for names with hashtagAlexey Andreyev
Fixes #359
2019-11-19BaseJob: Don't send accessToken if not needed; send again on 401Kitsune Ral
The first part closes #358; the second part is a workaround for non-standard cases when endpoints without security by the spec turn out to be secured (in particular, the case of authenticating media servers).
2019-11-10CleanupKitsune Ral
2019-11-10makeRedacted: fix code formattingKitsune Ral
2019-11-02Compatibility with Qt 5.14Kitsune Ral
2019-11-01Omittable: Add direct-list-initialising operator=; documentKitsune Ral
See the change in connection.cpp for the example of usage. Also: removed static_asserts: the first one is provided by std::optional, and the second one is only relevant to edit().
2019-11-01Reinstate Omittable<>::omitted (deprecated)Kitsune Ral
To ease on back-compatibility.
2019-11-01Omittable: get rid of value()Kitsune Ral
Xcode 10 doesn't have it, and value() is not quite fitting mostly-exceptionless Quotient anyway.
2019-11-01Derive Omittable<> from std::optional<>Kitsune Ral
That breaks API all over the place but: 1. The fixes are trivial. 2. More of std:: is used instead of home-baking the same stuff.
2019-10-21Connection: record sync timeout; suspend sync before logoutKitsune Ral
This is mostly internal but clients may see fewer spurious sync failures upon logging out.
2019-10-21Connection: make syncLoop() reentrantKitsune Ral
...in the sense that you can call it twice and expect the second invocation to be gracefully ignored rather than two loops conflicting with each other.
2019-10-21Merge branch 'kitsune-quotest2'Kitsune Ral
2019-10-21ConnectionData: fix read-after-free in clearing the job queueKitsune Ral
2019-10-20Qualify types in signals and Q_INVOKABLEsKitsune Ral
Because https://doc.qt.io/qt-5/moc.html#limitations . For direct connections that doesn't matter but it very much does for queued ones. Along with this DirectChatsMap and IgnoredUsersList have been moved from Connection:: to Quotient::.
2019-10-18qmc-example -> quotest, QMCTest -> TestManagerKitsune Ral
Also: some bits of refactoring in the test code to make it more extensible. Closes #352.
2019-10-17Connection::joinRoom: make sure the room object is created early enoughKitsune Ral
All direct slots connected to finished() will run before success() is even emitted; so create the room object in the earliest slot connected to finished(), rather than to success().
2019-10-02Fix Room::localAliases()Black Hat
When homeserver's csapi is in a subdomain, e.g. matrix.example.org, the authority of api endpoint url differs from server name, example.org. This causes Room::localAliases() to fail.
2019-10-02BaseJob::Private: experiment with [[nodiscard]]Kitsune Ral
2019-10-02More fixes for Apple not having deduction guides in stdlibKitsune Ral
2019-10-02wrap_in_function()Kitsune Ral
Because Apple stdlib doesn't have std::function deduction guides.
2019-10-01Room::getCurrentState()Kitsune Ral
2019-09-29Connection: allRooms(), rooms(), roomsCount(); deprecate roomMap()Kitsune Ral
Closes #354.
2019-09-29BaseJob, urlForLog() -> dumpRequest(): include HTTP verb into log linesKitsune Ral
2019-09-29Rename pieces with qmc/qmatrixclientKitsune Ral
2019-09-29function_traits: drop unused piecesKitsune Ral
is_callable won't ever be needed because std::is_invokable is here; arg_number and returns() didn't find its users; and function_type has been just broken all along for member functions.
2019-09-29Simplify visit() signatureKitsune Ral
Checking that BaseEventT descends from Event is really extraneous.
2019-09-29Make connectSingleShot work wherever QObject::connect worksKitsune Ral
Also: doc-comment connectUntil and unify implementation of both functions.
2019-09-29Settings: childGroups() should merge legacy and current groups; QMC->QTNT in ↵Kitsune Ral
macros Because otherwise migrating one group to the current location leads to all other groups suddenly disappearing from Settings view.
2019-09-29Fix formatting weirdnessKitsune Ral
Alas, clang-format is not terrifically good around [[attributes]]
2019-09-24Room: cleanupKitsune Ral
2019-09-12Introduce HashQ<> and UnorderedMap<>Kitsune Ral
Invading into std:: is frowned upon, even though legitimate from the C++ standard perspective. Given that it's possible to pass a hash object to unordered_map, it only takes an alias for std::unordered_map to avoid having to specialize std::hash. And besides, a generic compatibility bridge between qHash and std::hash has been long needed. std::hash<QString> in converters.h remains for now; it will be dropped separately when the API files get regenerated to use UnorderedMap.
2019-08-29Merge pull request #348 from quotient-im/kitsune-better-basejobKitsune Ral
Better BaseJob
2019-08-27More compliant 'using' for chrono_literalsKitsune Ral
Compilers warn on using 'using ...::operator""s' because they think we're redefining the reserved suffix.
2019-08-27Don't use enumerator attributesKitsune Ral
Anything after enumerators is a problem for moc before Qt 5.12; so we can't use enumerator attributes before then.
2019-08-27Tighten the code; add a missing #includeKitsune Ral
MSVC warns on class/struct mismatch and errors on std::array because `<array>` is not indirectly included on that platform.
2019-08-26Room::calculateDisplayname: use local aliases for room namingKitsune Ral
The Spec now allows it, even if with a disclaimer that it's subject for further removal.
2019-08-26setAvatarForRoom: try recover from otherAvatars inconsistencyKitsune Ral
Hopefully manages cases like #347 in a better way.
2019-08-25RoomMessageEvent::content(): constify event contentKitsune Ral
2019-08-20BaseJob/ConnectionData: connection-wide rate-limitingKitsune Ral
As before, completely transparent for clients, driven by 529 errors from the server (but cases of rate limiting are signalled by BaseJob::rateLimited). That brings changes to BaseJob API: timeouts now use int64_t and also can be handled in std::chrono terms; aboutToStart() -> aboutToSendRequest(); started() -> sentRequest(). Closes #292.
2019-08-20BaseJob: Status/StatusCode tweaks, cleanup, mo' commentsKitsune Ral
Notably, recovered Status::fromHttpCode() that was introduced in 5722ceaf4bd10c29f1091e3dc5a87f5650ea8c71 but fell victim of a careless merge (so much for introducing non-topical changes in feature branches).
2019-08-20Connection::run()Kitsune Ral
Finally, clients can pre-create job objects and then separately submit them for execution on a given connection - previously such separation was a privilege of Connection (others had to use Connection::callApi<>, which invoked jobs right away).
2019-08-20Store userId in ConnectionData instead of ConnectionKitsune Ral
To collect all connection-identifying information in a single place.