aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-03prettyPrint(): tighten up Matrix identifier regexAlexey Rusakov
It was too permissive on characters before the identifier and also allowed the domain name to start on dash, which should not occur. Closes #512.
2021-10-030.6.10Alexey Rusakov
2021-09-28quotest: timelineEdge() -> historyEdge()Alexey Rusakov
timelineEdge() is deprecated.
2021-09-28SyncData: drop a shortcut that led to ignoring invitesAlexey Rusakov
Fixes #510.
2021-09-120.6.9Alexey Rusakov
2021-09-08Room: actually initialise read marker when neededAlexey Rusakov
This fixes the `q->readMarker() != historyEdge()` assertion failure occuring in recalculateUnreadCount() when new events from sync arrive to a room with no read marker and all history loaded.
2021-08-240.6.8Alexey Rusakov
2021-08-24Refresh documentationAlexey Rusakov
2021-08-24tests/CMakeLists.txt: align CMake required versionAlexey Rusakov
Following the library's CMakeLists file, it's 3.10.
2021-08-09Merge branch 'kitsune-fix-read-receipts-markers-part3' into 0.6.xAlexey Rusakov
2021-08-01Room::setDisplayed(): Don't reset unread countersAlexey Rusakov
Closes #489.
2021-08-01Room::toJson(): save the last local user's read receiptAlexey Rusakov
Read receipts are entangled with counting unread messages, and saving them also helps in not sending receipts for too old events. Other users' read receipts are still treated as truly ephemeral.
2021-08-01Enhanced logging for read receiptsAlexey Rusakov
2021-08-01SyncRoomData: distinguish between omitted and 0 unread countersAlexey Rusakov
This is a more conservative but less idiomatic.readable fix for entirely missing notification_count/highlight_count. In reality, Synapse seems to always send them; but that is not required by The Spec.
2021-07-31Fix lack of percent encoding in User::fetchProfileAlexey Rusakov
Users with slashes in their ids do it at their own peril of course but to encode the id in the URL is a good thing in any case. Too bad it's pretty invisible and has to be dealt with case by case, instead of GTAD magically sticking QUrl::toPercentEncoding() where appropriate in the generated code.
2021-07-25Room: update cache state if needed after loading historyAlexey Rusakov
For now this is to update saved unread counts.
2021-07-24Room::setLastDisplayedEventId: Update local read receipt immediatelyAlexey Rusakov
There is no harm in updating it locally, as read receipts are only supposed to move forwards; if an update from another client of the same user arrives the next millisecond, it will only be incorporated if it points to an even newer event (exactly as would be expected). In any case, read receipts are more for others than for yourself.
2021-07-24Fix unread counter left intact after loading backscrollAlexey Rusakov
Another regression after the read receipts/markers rework, most prominently seen when a room has "0+" unread messages and the first historical batch gets loaded.
2021-07-24Room::Private::sync/historyEdge()Alexey Rusakov
Move Room::sync/historyEdge() implementation to Room::Private, so that internal logic could use the same readable shortcuts without q-> prefixes, instead of timeline.crend() and timeline.cend() that are much less readable.
2021-07-20Merge branch 'kitsune-read-receipts-markers-part2' into 0.6.xAlexey Rusakov
2021-07-20Promote read receipts/marker in addNewMessageEvents()Alexey Rusakov
Read marker promotion worked before the rework - and it works again with this commit. Read receipts are promoted from anywhere, the fully read marker is only promoted if it's adjacent to the batch just added.
2021-07-19addHistoricalMessageEvents(): restore force-recount logicAlexey Rusakov
Pre-e12d7ba2, addHistoricalMessageEvents() triggered recounting and emitting unreadMessagesChanged() even if the number remained the same. This logic has been lost when refactoring the code; now it's back there again.
2021-07-19Fix m.read getting stuck behind m.fully_readAlexey Rusakov
2021-07-16Merge branch 'kitsune-fix-read-receipts-and-markers-0.6' into 0.6.xAlexey Rusakov
2021-07-14User::rename(): actually build on the current stateAlexey Rusakov
This is a further extension of #481 fix that takes the whole current state event content, rather than just the avatar URL.
2021-07-14SyncData::parseJson(): further minor optimisationAlexey Rusakov
Just to align with the similar changes coming in 0.7
2021-07-14SyncData::parseJson(): fix incorrect reserve() argAlexey Rusakov
That is unlikely to impact performance, since reserve() is usually called only once per given JSON object (`{ "join": { ... } }`).
2021-07-14CMakeLists: fixed potential linking errors around quotient_common.hAlexey Rusakov
quotient_common.h has Q_NAMESPACE but no own compilation unit, and moc was not called on it either - using metaobject data on an enumeration defined in that file leads to a linking error due to sharedMetaObject not being defined. The fix makes so that the file is detected by automoc with the respective definition being generated.
2021-07-11Fix Room::processAccountDataEvent() return valueAlexey Rusakov
(cherry picked from commit 7b65051e959968fe538f40c975d85757cfcc7df7)
2021-07-10Merge branch '0.6.x' into kitsune-fix-read-receipts-and-markers-0.6Alexey Rusakov
2021-07-10Update and extend doc-comments for read marker-related methodsAlexey Rusakov
2021-07-10Fix Room::processAccountDataEvent() return valueAlexey Rusakov
2021-07-10Room: refactoring around logging (esp. profile logs)Alexey Rusakov
2021-07-10Room: fix the read markers/receipts confusionAlexey Rusakov
This turns the design changes laid out in #464 comments to code: - readMarker() now returns the fully read marker, unlike readMarker(User*) that returns a read receipt, even when called for the local user. - Private::setLastReadEvent() -> setLastReadReceipt(), incorporating the "promotion" logic from promoteReadReceipt(). - The above makes promoteReadReceipt() unneeded; the remaining piece of logic that recalculates the number of unread messages is put to its own method - Private::recalculateUnreadCount(). - Private::updateUnreadCount() is only slightly refreshed, continues to use the fully read marker position (as it used to). - Now that read receipts and fully read markers are managed separately, Private::setLastReadReceipt() has got its counterpart, Private::setFullyReadMarker(); both only update their respective markers locally (emitting signals as needed), without interaction with the homeserver. - Private::markMessagesAsRead() now delegates updating the fully read marker to setFullyReadMarker() and on top of that sends the new fully read marker to the homeserver. - Private::serverReadMarker -> fullyReadUntilEventId (to be really clear what it stores). - The hand-written PostReadMarkersJob is replaced with the generated SetReadMarkerJob that does the same thing (and can update the read receipt on top, though the current code doesn't use that).
2021-07-02Room::memberJoinState(): return Leave if user == nullptrAlexey Rusakov
2021-06-29More re-generated API files (only doc-comments updated)Alexey Rusakov
All actual updates to the API go to 0.7.
2021-06-29.appveyor.yml: And another typo fixAlexey Rusakov
2021-06-28.appveyor.yml: typo fixAlexey Rusakov
2021-06-28.appveyor.yml: use an existing Qt 5.9 configAlexey Rusakov
2021-06-28.appveyor.yml: drop old E2EE code from testingAlexey Rusakov
2021-06-28gtad.yaml: update for use with GTAD pre-0.8Alexey Rusakov
2021-06-27Room::processEphemeralEvents(): refactoringAlexey Rusakov
2021-06-27Retain the current room member avatar when renamingAlexey Rusakov
Closes #481. Note: the library doesn't even have the API in User to set per-room avatars; one still can achieve that by calling Room::setState<RoomMemberEvent>(...) though (and it's likely to be _the_ recommended way to deal with per-room user profiles in 0.7, with User being entirely deprecated).
2021-06-23Re-generated API files according to the previous commitAlexey Rusakov
Only API-preserving changes are included in this branch (0.7 will have all changes).
2021-06-23Update to the new matrix-doc layout and toolingAlexey Rusakov
Among things affecting Quotient, the update involved moving API files from api/ to data/api/, adding extensions to event schema files, and switching from ReStructured Text to Markdown as a lightweight markup language. This commit updates the build system and GTAD configuration to accommodate for these. The build system is also more robust now in choosing whether the update-api target should be provided. Previously the target was provided whenever GTAD_PATH and MATRIX_DOC_PATH were specified, even if they did not point to anything valid. CMake now checks that MATRIX_DOC_PATH is an actual directory and that GTAD_PATH points to an actual file.
2021-06-070.6.7Alexey Rusakov
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-20Add libquotient.kdev4 to .gitignoreTobias Fella
2021-05-08CI: Use GCC 9 where GCC 8 wasAlexey Rusakov
GitHub images no more have GCC 8. (cherry picked from commit f89ece678c47a54a28c91c2d0ced65ba3e9a6540)
2021-05-08Fix joinedRoom signal not being emitted in some casesAlexey Rusakov
An alternative implementation of #463 (and thanks to Carl for spotting the original problem).