aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-24Support inheritance in data structuresKitsune Ral
2017-10-19Introduce device_id and initial_device_name support; switch to generated ↵Kitsune Ral
LoginJob This is _almost_ a backwards-compatible change, except that connect*() and other relevant methods in Connection are no more virtual (that wasn't much useful anyway). Otherwise it's a matter of passing initial_device_name to connectToServer(), saving device_id (along with access_token) from the result of LoginJob and then passing device_id (along with access_token, again) to connectWithToken() upon the next run.
2017-10-19Don't log renamesKitsune Ral
This causes enormous traffic in the logs upon every startup when main.debug logs are on.
2017-10-19Generated jobs: Don't dump empty strings to body parametersKitsune Ral
This is important for (soon to be added) LoginJob, since the server is sensitive to getting an (even empty) entity for "medium" as opposed to omitting it entirely. This cannot be addressed on the spec level; on the other hand, removing empty parameters from the payload reduces useless bytes getting on the wire.
2017-10-19Be more friendly to IDE, list the API filesKitsune Ral
2017-10-19Merge branch 'master' into kitsune-gtadKitsune Ral
2017-10-17Avoid leaking access_token in the logsKitsune Ral
Closes #102.
2017-10-17Cache the actual user name, not the display nameKitsune Ral
Display name is a calculated thing, name is received from the server.
2017-10-17Fixed a blunder leading to users not having namesKitsune Ral
If all users suddenly don't have names, update to this commit, delete your cache and run again. Issue since 2bf912d6e6ddd9ff81a92ff28ac8c4c1d8f2d7e1.
2017-10-15Connection::forgetRoom(): Minor fixesKitsune Ral
2017-10-15Fixed building with clang+libcpp (used on OS X)Kitsune Ral
libcpp has pessimistic definition of array that only engages constexpr in C++14 mode and newer; so one cannot use std::array<> in constexpr code.
2017-10-14Actually added generated/profile.* files, needed to change display nameKitsune Ral
2017-10-14LogoutJob is supplied by generated codeKitsune Ral
2017-10-14Support of changing the display nameKitsune Ral
Note that although the mechanism is generic enough to change any user's display name, The Spec states that power rules are very strict about it.
2017-10-14Connection::forgetRoom()Kitsune Ral
2017-10-14Leaving a room now uses a generated Job fileKitsune Ral
2017-10-14Make JoinState (de)serializable library-wideKitsune Ral
2017-10-14Cleanup around Room (potentially breaks API compatibility, beware)Kitsune Ral
Notably: * API for SendEventJob and SetRoomStateJob has been altered to accept references, not pointers. * Methods on Room that invoke requests to the server, have lost const, because they may be reflecting the changed state on the fly, within themselves
2017-10-13Pass universal references in Connection::callApi<>; fixed a typo in util.hKitsune Ral
So that even uncopyable types could be used for parameters; also fixed a typo in util.h that prevented dispatch() from using with multiple argument functions.
2017-10-13Support banning and unbanningKitsune Ral
Closes #38. Also rearranged #includes
2017-10-13Cleaner generated filesKitsune Ral
2017-10-13Extend the number of types supported by fromJson<>()Kitsune Ral
Template function cannot have partial specializations, and we need to deserialise QVector<> objects. So fromJson<>() is now a wrapper around FromJson<> template class that does all the dispatching stuff in its operator().
2017-10-13All jobs: Drop ConnectionData parameter from the constructorKitsune Ral
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
2017-10-13Support banning and unbanningKitsune Ral
Closes #38. Also rearranged #includes
2017-10-12{{templates}} polishingKitsune Ral
2017-10-10Jobs with non-trivial results are generated properlyKitsune Ral
This addresses the last bullet in KitsuneRal/gtad#10, completing the implementation.
2017-10-10Protect against identifiers hitting on C/C++ reserved wordsKitsune Ral
2017-10-10Extend the number of types supported by fromJson<>()Kitsune Ral
Template function cannot have partial specializations, and we need to deserialise QVector<> objects. So fromJson<>() is now a wrapper around FromJson<> template class that does all the dispatching stuff in its operator().
2017-10-08Merge branch 'master' into kitsune-gtadKitsune Ral
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-10-02api-generator has been renamed to gtadKitsune Ral
2017-10-02Drop ConnectionData parameter from {{template}} files too; less blanksKitsune Ral
2017-10-02All jobs: Drop ConnectionData parameter from the constructorKitsune Ral
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
2017-10-02Room::id(): return crefKitsune Ral
A cref is still faster than incrementing a refcounter in QString, and all the other COW stuff, and room id is not supposed to change ever.
2017-10-02Introduce EncryptionEvent classKitsune Ral
This allows to detect if a room has been encrypted (no room state, just an event as of yet). Closes #84.
2017-10-01Merge branch 'master' into kitsune-apigenKitsune Ral
2017-09-28Merge pull request #86 from Quiark/masterKitsune Ral
Update qmake build file
2017-09-23Update qmake build fileRoman Plášil
2017-09-22Use epoch milliseconds instead of std::rand() to seed the txn counterKitsune Ral
std::rand() on MinGW on Windows 7, at least in debug mode, nicely generates the same value across runs, reliably leading to messages loss as the server discards them.
2017-09-22BaseJob: Log the sent request more nicelyKitsune Ral
2017-09-21jobs: SetRoomStateJob (with or without state key); setting room topicKitsune Ral
2017-09-21Merge pull request #83 from QMatrixClient/kitsune-invite-kickKitsune Ral
Support inviting, kicking and dealing with rooms in Invite state
2017-09-21Merge branch 'master' into kitsune-invite-kickKitsune Ral
2017-09-20Room::Private::toJson(): save user avatar URLs as wellKitsune Ral
Otherwise, users are doomed to stay avatarless upon restoration, until they update avatars again.
2017-09-20User: no more croppedAvatar(); added avatarUrl() accessorKitsune Ral
avatarUrl() is not yet invokable from QML; I'm considering to make all the simple things in User Q_PROPERTies instead.
2017-09-20BaseJob: track the outcome of sendRequest() in the logsKitsune Ral
Also: no reason to start the job timer if the request is not running, so don't even bother.
2017-09-20Minor optimisations in sync data parsingKitsune Ral
2017-09-20Room::updateData(): Don't profile empty structuresKitsune Ral
2017-09-19Room: Fixed a special case with invalid-read-marker-becoming-validKitsune Ral
It's a case when the last-read-event id refers to an event that was outside the loaded timeline and has just arrived. Depending on what messages follow the discovered last-read one, we might need to promote the read marker and update unreadMessages flag. The latter is especially relevant in our current situation when empty timelines upon the application startup are a norm.
2017-09-19Merge branch 'master' into cache-state-to-jsonKitsune Ral