aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-10Fix DELETE jobs with json dataTobias Fella
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.
2020-12-03CMakeLists.txt: fix configuration failuresKitsune Ral
2020-12-03CMakeLists.txt: reworked configuration loggingKitsune Ral
Notably, screen-wide ==== fences are gone, and the status messages are now located next to where the relevant piece of configuration occurs, instead of having a configuration summary block. Also, features related to code generation have been added for feature_summary().
2020-12-02Merge pull request #416 from ognarb/work/cmakefeaturesummaryKitsune Ral
Add feature summary to cmake file
2020-11-27Merge pull request #418 from ognarb/work/QT_NO_KEYWORDSKitsune Ral
Make it compile with QT_NO_KEYWORDS
2020-11-27Make it compile with QT_NO_KEYWORDSCarl Schwan
2020-11-26Add feature summary to cmake fileCarl Schwan
2020-11-24csapi/search.*Kitsune Ral
2020-11-24CMakeLists.txt: enable generating csapi/search.*Kitsune Ral
Now that the logic behind producing the C++ structures changed (they are filled in on the fly, rather than created upon job completion and then copied/moved by the accessor), GTAD makes buildable code for search.yaml.
2020-11-19Fix Q_ASSERT failure on sending messagesKitsune Ral
Changes in e81117fb exposed a flaw in EncryptionEvent causing assertion failure when this event is default-initialised (i.e. no encryption).
2020-11-15Cleanup across event classesKitsune Ral
In particular: removed unnecessary #includes, deprecated and no more used constructs, replaced stored members with dynamic generation from JSON (TypingEvent and, especially promising for performance, ReceiptEvent)
2020-11-14Make StateEventBase Q_GADGET tooKitsune Ral
To align with the two other base event classes (Event and RoomEvent).
2020-11-14CleanupKitsune Ral
2020-11-14Drop EventFactory<RoomPowerLevelsEvent>Kitsune Ral
RoomPowerLevelsEvent is not used in csapi/ classes so the factory is of no use either.
2020-11-14ConnectionData: fix defunct jobs stalling the queueKitsune Ral
2020-11-12Room: add power level events to redaction rulesKitsune Ral
2020-11-12More JSON key constantsKitsune Ral
2020-11-11.clang-format: update for ClangFormat 10+Kitsune Ral
Also: add space before colon in range-based for from now on. [skip ci]
2020-11-10MembershipType: drop warning on empty valuesKitsune Ral
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.
2020-11-08Room: drop setMemberState()Kitsune Ral
2020-11-08More robust member profile data retrievalKitsune Ral
MemberEventContent: displayname and avatarUrl are now Omittables; CS API doesn't guarantee their presence (see also https://github.com/matrix-org/matrix-doc/issues/1375) but Quotient used to assume they are always there, causing #412. RoomMemberEvent: displayname() -> newDisplayName() and avatarUrl() -> newAvatarUrl(), to emphasise the actual semantics (and also the changed interface). The old signatures still work but are deprecated. Instead of roomMembername() (with weird camel-casing), three new methods in addition to safeMemberName() are introduced to Room: - memberName() - produces the "best known" display name for a given member; User::name() uses it to avoid the pitfall of #412. - disambiguatedMemberName() - this is what roomMembername() used to be; not recommended for direct use when UI is concerned. - safeMemberName() - remains as is, with the fix to the documentation that used to mislead that the function returns HTML-escaped content (it didn't, and doesn't). - htmlSafeMemberName() - does what safeMemberName() claimed to do. Respectively, memberNames() is deprecated in favor of safeMemberNames() and htmlSafeMemberNames(). The corresponding Q_PROPERTY uses safeMemberNames() now. Similar to memberName(), Room has got memberAvatarUrl() to spare User class from diving into Room state to find the member avatar URL. Closes #412.
2020-11-08converters.h: add QUrl supportKitsune Ral
2020-11-06ChangePasswordJob: logoutDevices doesn't need OmittableKitsune Ral
This is generated by GTAD 0.7.1 (to be released), based on the changed registration.yaml (to be committed and pulled).
2020-11-06Further restrict IPv6 branch of ServerPartRegExKitsune Ral
2020-11-06.clang-format: add SpaceInEmptyBlock: false (clang 10)Kitsune Ral
2020-11-06Uri::toUrl(): fix incorrect matrix.to repKitsune Ral
The first character inside the fragment should be / (cherry picked from commit 948be2ef2bf04e306fbb0e2c3e0a98f4151337a7)
2020-11-06util.cpp: assert validity of regular expressionsKitsune Ral
(cherry picked from commit 0e87640560343c15b0a218796509d2d94e1a5c77)
2020-11-06More stringent serverpart checks in user idsKitsune Ral
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. (cherry picked from commit 3c85f049389dec3b0ee6406f0be2cfaf0089f1fe)
2020-10-28Merge pull request #411 from JohnDr/johnd-modsKitsune Ral
Added filter param to getPreviousContent
2020-10-27Added filter param to getPreviousContent so that a server side filterJohn
can be applied.
2020-09-04Update documentationKitsune Ral
[skip ci]
2020-09-04CONTRIBUTING.md: clarify the matrix-doc repo situationKitsune Ral
[skip ci]
2020-09-04Fixes of clazy warningsKitsune Ral
2020-09-04SyndData::parseJson: use fromJson()Kitsune Ral
...instead of a complicated explicit code converting from JSON to varianthash to hash.
2020-09-04csapi/profile.*: require displayname/avatar_urlKitsune Ral
See https://github.com/matrix-org/matrix-doc/issues/2717
2020-08-23More cleanup; drop Qt bearer management on Qt 5.15+Kitsune Ral
Qt 5.15 deprecates bearer management.
2020-08-22quotest: fix FTBFS after a sloppy cherry-pickKitsune Ral
2020-08-22quotest: fix changeName test failuresKitsune Ral
Member renames upon profile changes don't come right away, it turns out; so check User::nameChanged instead of Room::memberRenamed.
2020-08-22Cleanup and some extra commentsKitsune Ral
2020-08-11Build system optimisationsKitsune Ral
* -DQT_NO_JAVA_STYLE_ITERATORS * Use precompiled headers on CMake >= 3.16 (except GCC, blame its cheap PCH implementation) * -fvisibility-inlines-hidden when using CMake
2020-08-11Drop unneeded #includeKitsune Ral
2020-08-04quotest: fix the log wordingKitsune Ral
2020-08-04Connection: self-delete after emitting loggedOut()Kitsune Ral
The Connection object has quite few uses after logging out - neither rooms nor users under it no more represent actual situation, and the object cannot be cleanly reused for a new login (also, the use case for that is pretty dubious). This doesn't cover the case when the session has been forcibly logged-out by the server (causing loginError() to be emitted) - in that case re-authentication is an expected flow.
2020-08-04User: optimise names/avatars storing and updatingKitsune Ral
The current mechanism relied on a complicated and fragile machinery around setNameForRoom() and setAvatarForRoom() that maintained the "most used" entity for a given user along with "other" ones. Given that per-room avatars are pretty rare in Matrix, it's also been inefficient as kitsune-benchmark-set_ForRoom branch shows. The new mechanism stores the "default" (as per user profile) name and avatar and maintains a singleton map of avatar objects across all users. Per-user profile only (normally) exists for the local user so there's yet another inefficiency that will be fixed further down the road by introducing a separate user profile class.
2020-08-04quotest: don't fail on past name changes coming in syncKitsune Ral
Sync may bring past events in a few batches, it turns out, and quotest used to choke on name changes from its own past executions. Also: fix whitespacesmissing ina log line.
2020-08-04BaseJob: go for a retry on IncorrectResponseKitsune Ral
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).
2020-08-04Connection: stop the sync loop on SyncJob::failureKitsune Ral
2020-08-04Cleanup around [BaseJob::]IncorrectResponse[Error]Kitsune Ral
2020-08-04Room: various minor tweaks and fixesKitsune Ral
2020-08-04quotest: clean up the room state after testingKitsune Ral