aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-21Room::Private::postprocessChanges()Alexey Rusakov
This makes updating display name and emission of necessary signals including Room::changed() more systematic when it has to occur outside of updateData() flow - e.g. when loading all members.
2021-11-21SyncData: support MSC2654; partiallyReadCountAlexey Rusakov
Since MSC2654's unread count is counted from the m.read receipt, and the course is to follow the spec's terminology and use "unread count" for the number of notable events since m.read, this required to move the existing number of notable events since m.fully_read to another field, henceforth called partiallyReadCount. At the same time, SyncData::notificationCount is dropped completely since MSC2654 claims to supersede it. Also: Room::resetNotificationCount() and Room::resetHighlightCount() are deprecated, as these never worked properly overwriting values that can be calculated or sourced from the server, only for these values to be set back again the next time the room is updated from /sync.
2021-11-21Room: isEventNotable, notificationFor, checkForNotificationsAlexey Rusakov
Room::isEventNotable has been moved out from Room::Private and made compliant with MSC2654. The concept of Room::checkForNotifications is taken from Quaternion where a method with the same name has been in QuaternionRoom for a long time - however, actual body is a stub for now, always returning { Notification::None } (Quaternion's implementation is too crude to be taken to the library). Now we really need a pushrules processor to fill this method with something reasonably good. Internally the library now calls checkForNotifications() on every event added to the timeline, filling up the events-to-notifications map because it is anticipated that calculation of notifications can be rather resource-intensive and should only be done once for a given event. Finally, Room::notificationsFor is an accessor into the mentioned map, standing next to isEventNotable (but unlike isEventNotable, it's not virtual; checkForNotifications is).
2021-11-19continue-on-error on the job levelAlexey Rusakov
Continue on the step level marks the whole job as successful which is not really accurate.
2021-11-19Add continue-on-error for regenerated API filesAlexey Rusakov
The current upstream API definitions are expected to fail the test.
2021-11-19CleanupAlexey Rusakov
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-18Make Room::Changes an enum class; simplify enumeratorsAlexey Rusakov
This enumeration sees very limited (if any) use outside Quotient; and though this change will surely break code using it the fix is very straightforward and quick.
2021-11-17Fix QDateTime(QDate) deprecation warningsAlexey Rusakov
2021-11-17Room: refactoring around logging (esp. profile logs)Alexey Rusakov
2021-11-17Merge pull request #487 from quotient-im/kitsune-fix-read-receipts-and-markersAlexey Rusakov
Distinguish between read receipts and the fully read marker
2021-11-17Merge branch 'dev' into kitsune-fix-read-receipts-and-markersAlexey Rusakov
# Conflicts: # lib/room.cpp
2021-11-17Room: lastLocalReadReceipt(), localReadReceiptMarker()Alexey Rusakov
To simplify retrieval of the local m.read receipt and the marker for it.
2021-11-17Room: doc-comments cleanupAlexey Rusakov
[skip ci]
2021-11-17Bind read receipts to userIds, not to User* valuesAlexey Rusakov
This reduces the surface interacting with the User class that eventually will be split into LocalUser (most part) and RoomMember (a tiny wrapper around the member data in a given room, used almost everywhere in Room where User currently is). Also: dropped a log message when the new receipt is at or behind the old one as it causes a lot of noise in the logs.
2021-11-16Merge pull request #520 from TobiasFella/implicitthiscaptureAlexey Rusakov
Port away from implicit 'this' captures in lambdas
2021-11-16Merge pull request #519 from TobiasFella/noupfrontencodingAlexey Rusakov
Port away from deprecated upfront percent encoding
2021-11-16Port away from implicit 'this' captures in lambdasTobias Fella
Deprecated with C++20
2021-11-15Port away from deprecated upfront percent encodingTobias Fella
2021-11-12Make ReceiptEvent constructible from contentAlexey Rusakov
Makes the Room::P::toJson() code more readable.
2021-11-12Fix a few quirks in converters.hAlexey Rusakov
2021-11-12Fix building with GCCAlexey Rusakov
It didn't like using QT_IGNORE_DEPRECATIONS inside a statement.
2021-11-11Fix a few quirks in converters.hAlexey Rusakov
2021-11-11Update comments around read receipts codeAlexey Rusakov
2021-11-11Merge branch 'dev' into kitsune-fix-read-receipts-and-markersAlexey Rusakov
2021-11-11DECL_DEPRECATED_ENUMERATORAlexey Rusakov
A handy macro that introduces an enumerator with a respective Q_DECL_DEPRECATED_X recommending the substitution.
2021-11-08Room::Change: deprecate AccountDataChange, ReadMarkerChangeAlexey Rusakov
These usually don't affect the room outlooks in the room list in any way; so can be merged into OtherChange instead. Also: OtherChanges synonym has been added, implying that there might be more than one change behind a single "Other" flag.
2021-11-08Drop unused #includeAlexey Rusakov
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-11-07Add method to get all state events in a roomSmitty
It is useful to be able to get all of the state events that have occured in a room, instead of needing to use Room::getCurrentState, which filters based on the event type and state key.
2021-11-03Merge pull request #513 from TobiasFella/editedrepliesAlexey Rusakov
Keep the reply when replacing an event
2021-10-17Room: qualify signal parametersAlexey Rusakov
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-13connection.h: more doc-commentsAlexey Rusakov
2021-10-13CMakeLists: more robust GTAD_PATH detectionAlexey Rusakov
After switching over to get_filename_component(PROGRAM) paths with ~ (home directory) were no more resolved. They are again.
2021-10-13CMakeLists: don't report that update-api is enabled when it's actually notAlexey Rusakov
add_feature_info() treats unset variable as "no change" rather than "false", which may lead to a confusing build configuration report when GTAD_PATH and/or MATRIX_DOC_PATH and/or CLANG_FORMAT have been there before but were removed since.
2021-10-12Make sure to expose both the flags type and the underlying enumAlexey Rusakov
See also https://bugreports.qt.io/browse/QTBUG-82295.
2021-10-12Omittable: add a deduction guideAlexey Rusakov
Just for completeness, not really needed anywhere yet.
2021-10-12RoomMemberEvent::is*(): fix comparison against OmittableAlexey Rusakov
Closes #514.
2021-10-11formatJson(QDebug): Drop some very old cruftAlexey Rusakov
2021-10-10Room: 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-10-10ReadReceipt::operator==/!=: Add const where it's dueAlexey Rusakov
2021-10-10Merge branch 'master' into kitsune-fix-read-receipts-and-markersAlexey Rusakov
2021-10-10Keep the reply when replacing an eventTobias Fella
2021-10-05Quotest: return non-zero when things go really wrongAlexey Rusakov
...such as stuck login or failure to join the room. Closes #496.
2021-10-05Connection: fix C++20 warningsAlexey Rusakov
2021-10-05BaseJob: refresh error handlingAlexey Rusakov
- BaseJob::prepareError() slightly updated to get the current status instead of checking the returned value outside in gotReply() - BaseJob::gotReply() no more reports on 429 Too Many Requests twice (the first time with dubious "Too Many Requests: Unknown error")
2021-10-05BaseJob::StatusCode: officially deprecate most *Error enumeratorsAlexey Rusakov
2021-10-04Room: use more modern Connection APIAlexey Rusakov
2021-10-04Regenerate CS API files upon the previous commitAlexey Rusakov