aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-08-20Settings: get<>(); pass arguments more efficientlyKitsune Ral
Settings::get() and SettingsGroup::get() allow concise and efficient type-specific interface to value(); instead of wrapping your defaultValue into a QVariant, just pass it to get() instead of value().
2018-08-13Room::tagsChanged(): elaborate additions/removals along with the signalKitsune Ral
2018-08-13accountdataevents.h: Drop useless(?) static declarations for tag namesKitsune Ral
2018-08-13ConnectionsGuard: Fix clazy warningKitsune Ral
2018-08-12Revert JoinState::Any introductionKitsune Ral
Wasn't used in the code in the end.
2018-08-12Fix FTBFS (in a hacky way, needs a proper fix)Kitsune Ral
2018-08-12Fix building with older Qt versionsKitsune 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-11Connection::doInDirectChat: don't remove invite/left rooms from direct chatsKitsune Ral
Deletion of Invite rooms was a clear bug; as for left rooms, it makes sense to keep them in direct chat maps because they may be re-joined later on.
2018-08-11JoinStates: add JoinState::Any to match any stateKitsune Ral
2018-08-11Connection: don't crash on invalid user ids coming from the serverKitsune Ral
Closes #230.
2018-08-11Connection::*DirectChat(): add overloads accepting User*Kitsune Ral
2018-08-11Connection: drop extraneous Q_INVOKABLEKitsune Ral
Slots are Q_INVOKABLE by definition.
2018-08-06Room: addedMessages passes timeline indicesKitsune Ral
2018-08-06RoomMemberEvent: a set of is*() facility methodsKitsune 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-05eventCast: add an assertionKitsune Ral
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-03RoomEvent: fix wrong JSON key to pick/store transaction idKitsune Ral
2018-08-03Room::Private::doSendEvent: more logsKitsune Ral
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-08-03Connection::sendMessage: mark as tentativeKitsune Ral
...and therefore deprecated for use in clients _yet_.
2018-08-01Event: use Q_DISABLE_COPYKitsune Ral
2018-07-31Room::readMarkerMoved: pass 'from' and 'to' ids with the signalKitsune Ral
2018-07-31RoomEvent: don't store transactionId separatelyKitsune Ral
It's present on the vast minority of events so better be embedded into JSON instead.
2018-07-29csapi: define PushRule more accuratelyKitsune Ral
It's not always a JSON object; it's either a SetTweakAction object or a string. (Unfortunately, QVariant isn't a template type and there's no easy way to put Q_DECLARE_METATYPE(SetTweakAction) in a Mustache template, so adding one is left as an exercise to the user now.)
2018-07-28csapi/third_party_lookup.*: Properly pass a variadic (aka exploded) parametersKitsune Ral
Most of the actual change was in the API definition files (thanks to @anoadragon453), plus a converter from a QJsonObject map to the URL query string.
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-27util.h: findFirstOfKitsune Ral
A spin on the standard algorithm.
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-27connectSingleShot()Kitsune Ral
Time and again I need one-off slots that disconnect once they are done. The code has been inside Connection implementation for quite some time, now it's put to the interface for usage in other places (notably qmc-example).
2018-07-27Fix compilation with ClangKitsune Ral
2018-07-27makeEvent<>: Add a doc commentKitsune Ral
[ci skip]
2018-07-27event.h: drop eventCast for references; other cleanupKitsune Ral
Omittable<> doesn't work with reference types and returning an unknown event spoils the experience. It's much simpler to just deal with event pointers instead.
2018-07-27Omittable<>: use std::decay<>, add assertionKitsune Ral
...against unwrapping omitted values (the release build will return a default-constructed value).
2018-07-23Fix rooms tags being incorrectly setKitsune Ral
Many thanks to @encombhat for pinpointing.
2018-07-22Switched to GTAD 0.7-preKitsune Ral
{{>}} instead of {{#@filePartial}}, library macros begin with _ instead of @, mustache/definitions split - see the GTAD commit log.
2018-07-22gtad.yaml: cleanupKitsune Ral
2018-07-22Merge pull request #223 from encombhat/masterKitsune Ral
Expose Room::addTag() and Room::removeTag() to QML
2018-07-22Change order data type.Black Hat
2018-07-22csapi: Minor cleanup in #includes, part 2Kitsune Ral
2018-07-22csapi: Minor cleanup in #includesKitsune Ral
2018-07-21csapi: add definitions/auth_data.* and optimise out trivial files with the ↵Kitsune Ral
latest GTAD
2018-07-21Overload Room:addTag.Black Hat
2018-07-21Mark Room::addTag() and Room::removeTag() as Q_INVOKABLE.Black Hat