aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
AgeCommit message (Collapse)Author
2019-01-05FileTransferInfo: new properties: isUpload and startedKitsune Ral
Also: use constructors instead of list-based initialisation in FileTransferPrivateInfo to enable a case of "invalid/empty" FileTransferPrivateInfo with status == None.
2018-12-16Room: messageSent(), better pendingEventAboutToAdd(), more doc-commentsKitsune Ral
2018-12-12Room: more doc-commentsKitsune Ral
2018-12-12Room::allMembersLoaded(); more doc-commentsKitsune Ral
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-08Room summariesKitsune Ral
2018-11-23Room: track more ChangesKitsune Ral
2018-11-23Room/Connection: don't save the just loaded room cacheKitsune Ral
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-19Room: expose eventsHistoryJob as a Q_PROPERTYKitsune Ral
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-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-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-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-16Use the right header file for QImageKitsune Ral
2018-09-12Merge pull request #1 from QMatrixClient/masterBlack Hat
Merge to latest commit.
2018-09-09Room::beforeDestruction()Kitsune Ral
This is to allow connecting to before-destruction of one specific room, rather than any room under a connection (for which Connection::aboutToDeleteRoom() still exists).
2018-09-09room.h: Unify doc-commentsKitsune Ral
Doxygen/Qt style is preferred from now on.
2018-09-09CleanupKitsune Ral
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-29Use local QHash.Black Hat
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-04Room: avoid overloading postMessage, as QML is bad at resolving overloaded slotsKitsune Ral
Closes #227.
2018-08-03Room::retryMessage and Room::discardMessageKitsune Ral
2018-08-03Refactor event itemsKitsune Ral
* TimelineItem and a newly introduced PendingEventItem are now inheriting from the common EventItemBase class * PendingEventItem has its own status and annotation, serving to track transition of the item through pending states
2018-07-31Room::readMarkerMoved: pass 'from' and 'to' ids with the signalKitsune Ral
2018-07-28Room: validate tags before sending them to the serverKitsune Ral
See https://github.com/matrix-org/matrix-doc/pull/1457 for the background.
2018-07-27Make Room::postMessage and Room::postHtmlMessage return transactionIdKitsune Ral
This is at least some (actually, not even that bad) identification of a message. Ideally it would probably be to return some handler that would allow to track the end-to-end status of the event - from getting sent to landing in the timeline. Right now the experience is crippled - transactionId always exists but only works for message events and Room has no way to give the event status by transactionId. pendingEvent* signals are somewhat helping, though.
2018-07-27Provide a way to match the echo against the synced eventKitsune Ral
This needed to split the container with the freshly arrived events into parts that don't have local echo and echo'ed events, and add them to the timeline emitting two different pairs of signals. Instead of being removed, pending events are now merged (effectively they are removed from unsyncedEvents container anyway but models can represent this as an echo event being "transformed" into a full-fledged one on a timeline).
2018-07-27Initial support for local echoKitsune Ral
The Room class has gained a new internal container, unsyncedEvents, storing locally-created Event objects that are about to be sent or are sent but not yet synced. These objects are supposed to be complete enough to be displayed by clients in a usual way; access to them is provided by Room::pendingEvents() accessor. A set of pendingEvent* signals has been added to notify clients about changes in this container (adding, removal, status update). Yet unsent events don't have Event::id() at all; sent but yet unsynced ones have Event::id() but have almost nothing else except the content for now (probably a sender and an (at least local) timestamp are worth adding). Also: SendEventJob is removed in favor of GTAD-generated SendMessageJob.
2018-07-22Change order data type.Black Hat
2018-07-21Overload Room:addTag.Black Hat
2018-07-21Mark Room::addTag() and Room::removeTag() as Q_INVOKABLE.Black Hat
2018-07-10Room::postHtmlMessage() - a facility method to send HTML messagesKitsune Ral
2018-07-08TimelineItem::viewAs(): fix a typoKitsune Ral
2018-07-08TimelineItem: get(); validating viewAs<>()Kitsune Ral
Having get() allows to work with TimelineItem as a smart pointer.
2018-07-04TimelineItem::operator*()Kitsune Ral
2018-07-04Event types system remade to be extensibleKitsune Ral
There were two common points that had to be updated every time a new event is introduced: the EventType enumeration and one of 3 doMakeEvent<> specialisations. The new code has a template class, EventFactory<>, that uses a list of static factory methods to create events instead of typelists used in doMakeEvent<>(); the EventType enumeration is replaced with a namespace populated with constants as necessary. In general, EventType is considered a deprecated mechanism altogether; instead, a set of facilities is provided: is<>() to check if an event has a certain type (to replace comparison against an EventType value) and visit<>() to execute actions based on the event type (replacing switch statements over EventType values). Closes #129.
2018-07-01weakPtr -> weakPtrCastKitsune Ral
2018-05-28Move out prettyPrint() from Room to util.hKitsune Ral
So that it could be used outside of room context.