aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-10Uri: fix a few cases of insufficient escapingKitsune Ral
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-03Room: fix breakage in internal member mapKitsune Ral
The change in 39830496 led to prev_content becoming a fallback not only for displaying user names but also for storing them in the internal member map, which is really not what was intended.
2020-11-26quotest: Refreshed a commentKitsune Ral
[skip ci]
2020-11-24.clang-format: update for ClangFormat 10+Kitsune Ral
Also: add space before colon in range-based for from now on. [skip ci]
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-15Room: add power level events to redaction rulesKitsune Ral
2020-11-15MembershipType: 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-15Room::P::getCurrentState<>(): bypass the factory chainKitsune Ral
This is to optimize a rather hot path creating stub events (for member events in bigger rooms, in particular) when the event type is known. Version 0.7 will have a completely different code based on event content rather than event that will obviate stubs creation but 0.6.x can benefit from it.
2020-11-14ConnectionData: fix defunct jobs stalling the queueKitsune Ral
2020-11-09Room: be more robust in Release modeKitsune Ral
...in one particular case, when trying to add a user to a room it's already a member of.
2020-11-08User: take profile data from prevContent when main content omits themKitsune Ral
Closes #412.
2020-10-230.6.2Kitsune Ral
2020-09-11Uri::toUrl(): fix incorrect matrix.to repKitsune Ral
The first character inside the fragment should be /
2020-09-11util.cpp: assert validity of regular expressionsKitsune Ral
2020-09-11More 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.
2020-09-04Update documentationKitsune Ral
[skip ci]
2020-09-04More fixing of clazy warningsKitsune Ral
2020-09-04csapi/profile.h: require displayname/avatar_urlKitsune Ral
See https://github.com/matrix-org/matrix-doc/issues/2717
2020-09-04CONTRIBUTING.md: clarify the matrix-doc repo situationKitsune Ral
[skip ci]
2020-09-03Code formatting fixKitsune Ral
2020-09-03Address clazy warningsKitsune Ral
2020-09-03SyndData::parseJson: use fromJson()Kitsune Ral
...instead of a complicated explicit code converting from JSON to varianthash to hash.
2020-08-30Bump version in CMakeLists.txt to 0.6.1Kitsune Ral
The new release upcoming.
2020-08-23User: displayname() should fallback to name()Kitsune Ral
As of 0.6.1, User::name() triggers fetching the user profile (whether this is right is a separate question but that's the way it works with the current library API) - displayname() should use it rather than shortcut to d->defaultName to get results consistent with User::name().
2020-08-23csapi/profile.cpp: fix setting empty name/avatarKitsune Ral
This is a temporary workaround for https://github.com/matrix-org/synapse/issues/8029 - note that regenerating CS API code will lead to overwriting this. The proper fix should be done in matrix-doc (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 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-17Fetch user profile when neededKitsune Ral
5849686e introduced a new way of storing user avatars and names - unfortunately it didn't fully cover the case of the user's default (profile) name and avatar. This commit fixes it; in 0.6.x branch, the fix requires a const_cast<> hack since name() and avatarObject() invocations are used as triggers to fetch the profile. 0.7 will have User::fetchProfile() method instead.
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.
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-04Quotest: fix whitespacesmissing ina log lineKitsune Ral
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 commit c69f100e 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 - this will be fixed in 0.7 by introducing a special class for a user profile.
2020-08-04Room: various minor tweaks and fixesKitsune Ral
2020-08-03quotest: clean up the room state after testingKitsune Ral
2020-08-03quotest: use #test instead of #quotient in loadMembers testKitsune Ral
#quotient:matrix.org is a primary channel to talk to users and developers, and events produced by changeName test come really noisy. #test:matrix.org is a perfect place to test things out, OTOH.
2020-08-03CleanupKitsune Ral
2020-08-02User: fix FTBFS and access after moveKitsune Ral
2020-08-02quotest: add changeName testKitsune Ral
2020-07-30User: minor cleanup; doc-commentsKitsune Ral
2020-07-29User: only set object name at initialisationKitsune Ral
User::updateName() usually operates on a specific room; setting an object name from an arbitrary (whichever came last at any point in time) room member event for a given user does not look like a good idea. And having it in User::updateAvatar() seems to be a copy-paste fallout.
2020-07-29Fix FTBFSKitsune Ral
2020-07-29User: don't spend another pointer on ConnectionKitsune Ral
Users are always parented to their Connection; there's no need to store a pointer to the connection on top of the one already stored by QObject.
2020-07-29User: deprecate bridged() and rawName()Kitsune Ral
Bridge postfixes stopped being a thing long ago; since then, bridged() has nothing but an empty string, and rawName() coincides with name().
2020-07-26RoomAvatarEvent: add constructors from contentKitsune Ral
So that room avatar events could also be sent, not only received.
2020-07-24SECURITY.md: add 0.6.x breedKitsune Ral
2020-07-24Room: send read receipts in a background requestKitsune Ral
Sending them in the foreground causes Quaternion to throw scary messages when read receipts don't go through while that's actually not a big deal. Also, network traffic deprioritisation.