aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
AgeCommit message (Collapse)Author
2018-12-09Room: defer memberListChanged(); track room summary changesKitsune Ral
This concludes beta-version of lazy-loading support in libQMatrixClient (#253).
2018-12-09Room: track more changes; fix cache smashing upon restartKitsune Ral
Commit fd52459 introduced a regression rendering the cache unusable after a client restart (an empty state overwrites whatever state was in the cache). This commit contains the fix, along with more room change tracking.
2018-12-09MSC 688: MSC-compliant RoomSummary; update Room::calculateDisplayname()Kitsune Ral
The members of the summary can be omitted in the payload; this change fixes calculation of the roomname from hero names passed in room summary. Also: RoomSummary can be dumped to QDebug now.
2018-12-08Room summariesKitsune Ral
2018-11-23Room::setLastReadEvent: save room state when updating own read markerKitsune Ral
2018-11-23Room: track more ChangesKitsune Ral
2018-11-23Room/Connection: don't save the just loaded room cacheKitsune Ral
2018-11-22Save state cache per-roomKitsune Ral
Closes #257.
2018-11-22Room: Change enum, Changes flag set, and changed() signalKitsune Ral
This allows to batch updates into signals being emitted only once per sync. Also supercedes emitNamesChanged flag used in a few places.
2018-11-20Make SyncData more self-contained and prepare for cache splittingKitsune Ral
SyncData now resides in its own pair of files and is capable to load either from file or from JSON. There is also (yet untested) capability to load rooms from files if a file name stands is the value for a given room id. This allows to store the master cache file separately from cache files for each room, massively easing the problem of bulky accounts that can overflow the poor capacity of Qt's JSON engine.
2018-11-19Don't cache empty events; prepare for lazy-loadingKitsune Ral
These two are intermingled in Room::addHistoricalMessageEvents because processing empty events found in a historical batch is no different from discovering (not lazy-loaded) members.
2018-11-19Room: process new state events after applying redactionsKitsune Ral
This was one more cause of #257 - the case when a redaction on a state event arrives in the same batch as the redacted event.
2018-11-19Room: expose eventsHistoryJob as a Q_PROPERTYKitsune Ral
2018-11-19Room: profile addHistoricalMessageEvents (+cleanup)Kitsune Ral
2018-11-17Room: cleanupKitsune Ral
2018-11-17Room::processStateEvent: process banning correctlyKitsune Ral
Closes #258.
2018-11-14Room: fix incorrect handling of state event redactionsKitsune Ral
Also: use Matrix type instead of internal type id in StateEventKey (Because internal type id maps to the library type system which will not discern between Unknown events and therefore will mix together events of different types in Room::Private::baseState/currentState. The Room code is updated accordingly (bonus: more asserts there).) Closes #255.
2018-11-14Room: historyEdge(), syncEdge, Private::timelineBase()Kitsune Ral
Also: make moveEventsToTimeline() always put historical events from position -1 rather than 0 so that Private::baseState could always correspond to the before-0 position.
2018-11-14Improvements in commentsKitsune Ral
- registerEventType(): comment the cryptic _ variable - Room::postEvent: document the return value - Room::Private: upgrade comments to doc-comments - even though in Private, they still are helpful to show hints in IDEs. - General cleanup
2018-11-14Room: ensure proper error signalling on event sending failuresKitsune Ral
2018-11-05isEchoEvent: check the pending event for ids, not the synced oneKitsune Ral
Synced events always have their event ids, so checking those for event id renders most of the function useless (and returns an incorrect result). Closes #248.
2018-11-04Profiler logging fixes and improvementsKitsune Ral
2018-11-04Room: store state events in a unified wayKitsune Ral
Closes #194.
2018-10-26Use tr() for pluralsKitsune Ral
2018-10-12Room::addTag: use float instead of Omittable<float>Kitsune Ral
No-order is already modelled with the other overload, and Omittable<> breaks interfacing with QML.
2018-10-05Room: fix a blunder leading to accessing data after moveKitsune Ral
2018-10-04Modernise and fix code dealing with call eventsKitsune Ral
Call events no more store deserialised values; instead they deserialise values on the fly, same as all other events. They are no more treated as state events (The Spec doesn't define them as state events in the first place). A common base class, CallEventBase, is introduced that defines data pieces common to all call events (call id and version).
2018-09-30Room: Unify tags both when getting and settingKitsune Ral
2018-09-30Room: use csapi/tags.h; fix tagsChanged() double-emissionKitsune Ral
Instead of overwriting the entire set of tags even on single-tag operations, SetRoomTagJob and DeleteRoomTagJob are used now. (Room::setTags() still uses SetRoomAccountDataJob).
2018-09-25Room::addTag: fix the QML-friendly overload's parameterKitsune Ral
TagRecord::order_type is float now, not QString.
2018-09-17return false in processStateEvent; make processCall privateJosip Delic
2018-09-16Merge remote-tracking branch 'upstream/master'Josip Delic
2018-09-16Introduce Room::displaynameAboutToChange()Kitsune Ral
2018-09-12Merge pull request #1 from QMatrixClient/masterBlack Hat
Merge to latest commit.
2018-09-02Switch tag order from strings to floats, as The Spec preachesKitsune Ral
The Spec wasn't entirely consistent on this until recently but floats actually are used in the wild, rather than strings.
2018-08-30Add signal for read receipt.Black Hat
2018-08-30Remove unused check.Black Hat
2018-08-29Use QMultiHash.Black Hat
2018-08-29Use local QHash.Black Hat
2018-08-25Update make it compileJosip Delic
2018-08-25Update marius voip to new libqtmcJosip Delic
2018-08-20Room::displaynameChanged() should pass the old name tooKitsune Ral
Also: general cleanup.
2018-08-13Room::tagsChanged(): elaborate additions/removals along with the signalKitsune Ral
2018-08-11Reverse direct chats mapKitsune Ral
Speeds up lookup of user(s) in a direct chat room. Also: "The other one's" avatar is used to set the avatar of direct chats only, not any room with 2 participants.
2018-08-06Room: addedMessages passes timeline indicesKitsune Ral
2018-08-05Room: add redaction events to the timelineKitsune Ral
Not that it felt right but Riot does it and so should we. Closes #220.
2018-08-05Room: rework processing redactionsKitsune Ral
Redaction events are now processed before, not after/along with normal events. This complicates logistics a bit but makes sure to-be-redacted events get redacted even before the client is notified about new arrivals. Also, redaction events are unconditionally out of the timeline for the moment (the non-starter KEEP_REDACTIONS_IN_TIMELINE macro is gone). This reinstates #196 for now, which will be addressed separately.
2018-08-04Room: avoid overloading postMessage, as QML is bad at resolving overloaded slotsKitsune Ral
Closes #227.
2018-08-03Room: improve logging, add an assertionKitsune Ral
2018-08-03Room::Private::doSendEvent: more logsKitsune Ral