aboutsummaryrefslogtreecommitdiff
path: root/events/receiptevent.cpp
AgeCommit message (Collapse)Author
2018-03-31Move source files to a separate folderKitsune Ral
It's been long overdue to separate them from the rest of the stuff (docs etc.). Also, this allows installing to a directory within the checked out git tree (say, ./install/, similar to ./build/).
2018-03-05Support server-side read marker (m.full_read)Kitsune Ral
Closes #183. There's also the m.read part but it can be done sometime later, as it's pure optimisation.
2018-02-25ReceiptEvent: code cleanupKitsune Ral
2017-12-25ReceiptEvent: use QVector instead of std::vectorKitsune Ral
Because we should practice what we preach in CONTRIBUTING.md.
2017-11-01ReceiptEvent: Use fromJson<>() from converters.h; add TypeIdKitsune Ral
Event::toTimestamp() duplicates fromJson<>() code, so it should go.
2017-10-03Room: cache unread indicator inside m.read content, not next to itKitsune Ral
The CS API, turns out, has a quite official extension point inside m.read event content - clients are allowed to put whatever extra data they feel reasonable.
2017-09-19Room: cache last read event and unread messages flag with the room stateKitsune Ral
Since there's no such thing as "unread messages flag" in the CS API spec, there's now a non-standard key-value in cached m.read receipts for that.
2017-05-22Refactored EventsKitsune Ral
The biggest change is we have no pimpls in Event objects anymore - because it's two new's instead of one per Event, and we have thousands and even more of Events created during initial sync. The other big change is introduction of RoomEvent, so that now the structure of events almost precisely reflects the CS API spec. The refactoring made UnknownEvent unnecessary as a separate class; a respective base class (either RoomEvent or Event) is used for this purpose now. All the other changes are consequences of these (mostly of RoomEvent introduction).
2017-05-13Refactored logging enhancementsKitsune Ral
logging.h/logging.cpp is now a full-fledged pair for all things logging. Two more categories added, EPHEMERAL and SYNCJOB, that control logging for ephemeral events and SyncJob, respectively (in particular, switching off EPHEMERAL greatly reduces the logspam about moving read markers and how many users have read up to which event).
2017-04-30Port to categorized loggingElvis Angelaccio
This greatly reduces the noise made by quaternion. To enable full logging, export the following variable: QT_LOGGING_RULES="libqmatrixclient.*.debug=true"
2017-02-26Skip read events with an empty event idKitsune Ral
2017-02-23Receipts internal handling improvedKitsune Ral
Instead of QHash, use QVector< QPair<> > because it's more efficient and we don't really need a hashmap functions, only direct iteration over the list of event-to-receipt pairs. Also, iteration over QJsonObjects is more efficient (and better conveys the intention) than collecting keys() and then finding a value() for each of them. Also, fixed accidental allocation of empty Receipt structures instead of reserving space for them.
2016-11-01Receipt: eventId is extraneous inside the receipt, since receipts are ↵Kitsune Ral
associated with Event objects anyway
2016-11-01Removed unused #includesKitsune Ral
2016-08-22Replaced QList<> with QVector<> where appropriate + minor code cleanupKitsune Ral
See https://marcmutz.wordpress.com/effective-qt/containers/ for the background and http://lists.qt-project.org/pipermail/development/2015-July/022283.html for the relevant flamewar in Qt dev mailing list.
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral