aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
AgeCommit message (Collapse)Author
2019-03-10Room::checkVersion(): be tolerant to already upgraded roomsKitsune Ral
2019-02-27Connection::stopSync: undo the sync loopKitsune Ral
2019-02-22Room::setAliases, Connection: roomByAlias, updateRoomAliasesKitsune Ral
2019-02-17Connection: loadingCapabilities(); sort availableRoomVersionsKitsune Ral
2019-02-15Room::checkVersion() and Room::unstableVersion()Kitsune Ral
Initial (sans power levels checking) implementation of the check that room should be upgraded. Closes most of #236.
2019-02-15Connection: load supported room versionsKitsune Ral
A part of #236.
2019-02-15Merge branch 'master' into kitsune-room-versionsKitsune Ral
2019-02-11Connection::createRoom: support passing a room versionKitsune Ral
On the path to address #233.
2019-02-10Connection: move syncLoopTimeout to Connection::PrivateAlexey Andreyev
Signed-off-by: Alexey Andreyev <aa13q@ya.ru>
2019-02-05Connection: simplified sync loop logic without delaysAlexey Andreyev
Signed-off-by: Alexey Andreyev <aa13q@ya.ru>
2019-02-03Connection: separated sync loop logic with delay controlAlexey Andreyev
Signed-off-by: Alexey Andreyev <aa13q@ya.ru>
2019-01-30Connection: infinite sync loop logic by defaultAlexey Andreyev
2019-01-13Connection: fix/workaround glitches on joining/leavingKitsune Ral
Closes #273, in particular.
2019-01-13Connection::provideRoom: allow omitting join stateKitsune Ral
2019-01-05Connection::upload*: autodetect content type if not suppliedKitsune Ral
2018-12-13Connection: initialize lazyLoading member variableKitsune Ral
2018-12-11Expose Connection::nextBatchToken()Kitsune Ral
2018-12-08Room summariesKitsune Ral
2018-12-08Connection: support members lazy-loadingKitsune Ral
This should cover the Connection-related part of #253. Connection gained lazyLoading/setLazyLoading accessors and the respective Q_PROPERTY. When lazy loading is on, sync() adds lazy_load_members: true to its filter.
2018-12-08Connection: Avoid Omittable<>::operator boolKitsune Ral
It was accidentally (and incorrectly) used in tags sorting code; will be dropped from Omittable<> in a later commit.
2018-11-23Room/Connection: don't save the just loaded room cacheKitsune Ral
2018-11-23Connection::saveState: use null instead of an empty object for a roomKitsune Ral
placeholder Otherwise placeholder objects are confused with normal room JSON objects when loading from the cache. Closes #257 (again).
2018-11-22Connection: Log when a room state cache is writtenKitsune Ral
2018-11-22Save state cache per-roomKitsune Ral
Closes #257.
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-19BaseJob::rawDataSample()Kitsune Ral
A new recommended (and localisable) way of getting a piece of raw response to display next to error messages as "details". BaseJob::rawData() returns exactly the trimmed piece of data, no "truncated" suffix there anymore.
2018-10-29Connection::joinRoom: allow to specify intermediate serversKitsune Ral
Closes #127.
2018-09-16Merge remote-tracking branch 'upstream/master'Josip Delic
2018-09-16Connection: make factories a bit more customisableKitsune Ral
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-09CleanupKitsune Ral
2018-08-29Merge branch 'master' of https://github.com/QMatrixClient/libqmatrixclientJosip Delic
2018-08-29Use GetTurnServerJob for csapiJosip Delic
2018-08-25Update to the recent CS API (watch out for breakage)Kitsune Ral
Breaking changes: * guest_can_join is no more a thing - neither in Connection::createRoom, nor even in CreateRoomJob (it turned out that Synapse didn't really process this flag); * LoginJob has changed its list of arguments. If you use Connection to do logins (and you really should), you shouldn't be affected. * GetPublicRoomsJob now returns PublicRoomsResponse instead of providing all the response parts within the job Watch other changes in the diff.
2018-08-25Update marius voip to new libqtmcJosip Delic
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-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-03Connection::sendMessage: mark as tentativeKitsune Ral
...and therefore deprecated for use in clients _yet_.
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-19Connection::stateChanged() signalKitsune Ral
Also: as of the previous commit, we officially bump API version to 0.4
2018-07-16Connection::uploadFile(): Fix a missing negationKitsune Ral
...leading to uploadFile() being never even functional - the code really needs tests. Closes #221.
2018-07-04Add more #includes missingKitsune Ral
2018-07-04Support ignoring usersKitsune Ral
Closes #215.
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-04Merge branch 'kitsune-raw-literal-qstringliteral'Kitsune Ral