aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
AgeCommit message (Collapse)Author
2018-03-27Rework unread messages counting logicKitsune Ral
The previous one didn't cover all the cases; the current one seems to do. Closes #192. Accompanied by the developer's notes at: https://github.com/QMatrixClient/libqmatrixclient/wiki/unread_count
2018-03-26Connection::directChatUsers()Kitsune Ral
2018-03-25Minor cleanupKitsune Ral
2018-03-25Connection::doInDirectChat() and refactored direct chat requesting logicKitsune Ral
Basically, the whole requestDirectChat() body has been moved and generalised to doInDirectChat(), and requestDirectChat() delegates to doInDirectChat(). The logic has been updated to cope with formerly left/forgotten rooms present in the list of direct chats (cleaning up the list along the way).
2018-03-25Direct chat (un)marking: update internal structure synchronouslyKitsune Ral
The asynchronous update first implemented was more verbose and caused more problems than provided solutions. The idea was that the internal directChats map would better reflect the server state if updated asynchronously. However, it also causes a local race condition; e.g., to quickly remove rooms from direct chats one after another becomes very non-trivial (one has to wait until the previous operation succeeds). So after some playing with the code, hitting pitfalls along the way, I decided to align the logic with the one for room tags; synchronously issued signals look uglyish but at least work predictably. And race conditions between several clients generally cannot be cleanly resolved anyway.
2018-03-26Connection::room() and Connection::invitation()Kitsune Ral
2018-03-24Dealing with direct chatsKitsune Ral
Receiving and caching m.direct (and other non-room account data along the way); Connection::addToDirectChats/removeFromDirectChats (might get siblings in Room eventually but not now), Connection/User::requestDirectChat. Closes #163.
2018-03-19fix error handling in loadState()Lewis Rockliffe
2018-03-05Profile-log if saving state has been interrupted by processEvents for long ↵Kitsune Ral
enough
2018-03-05Use constants instead of hardcoded stringsKitsune Ral
2018-03-05Fix a typo leading to cache never workingKitsune Ral
2018-03-04Connection: allow to choose between binary and text JSON cacheKitsune Ral
2018-03-04QCoreApplication::processEvents() is static, doesn't need instance()Kitsune Ral
Thanks to clang-tidy for spotting that.
2018-03-03Caching: switching to binary JSON format; yield to event loop while making a ↵Kitsune Ral
cache payload
2018-03-01Connection::tagNames()Kitsune Ral
To be able to get all available tags throughout the connection.
2018-02-28Don't resolve the homeserver port from a user MXIDKitsune Ral
Closes #176. The right way (c) of server name resolution will be done in #178 (see also the Google Doc mentioned in it).
2018-02-28Profiling logs: added µs, less empty profiling log linesKitsune Ral
Closes #177.
2018-02-27Room: Save tags in the cache; isFavourite() and isLowPriority()Kitsune Ral
2018-02-26Deal with memory more carefullyKitsune Ral
Plugs some memory leaks reported by Valgrind.
2018-02-26Room and Connection: support room tagsKitsune Ral
Closes #134.
2018-01-31Connection::createdRoom() signalKitsune Ral
2018-01-30Connection: expose the list of users; use an ordered mapKitsune Ral
It's still an open question whether it's better to store a separate sorted index of users, next to an unsorted one; but a sorted list of users is of much more use in GUI than an unsorted one.
2018-01-30Connection: more Q_PROPERTYs, newUser signalKitsune Ral
2018-01-30Connection::createRoom and Connection::createDirectChatKitsune Ral
2018-01-30Connection class cleanupKitsune Ral
createRoom and createUser renamed to roomFactory and userFactory (because createRoom will mean a different thing); unneeded #include moved to the cpp file.
2018-01-30Connection::onSyncSuccess: call processEvents upon each room parsingKitsune Ral
When there are too many rooms to process, this gives at least some bandwidth for the GUI in the meantime.
2018-01-25Merge branch 'kitsune-better-forget'Kitsune Ral
2018-01-25Connection: intercept late-coming /sync response on a just forgotten roomKitsune Ral
Closes #160.
2018-01-25Connection::provideRoom: assert no empty idsKitsune Ral
Bonus: slightly more accurate comment in Connection::forgetRoom
2018-01-25Room::toJson: fix invite state cachingKitsune Ral
Causes a cache version upgrade; the old cache stores the state in an incorrect place that won't be supported. Closes #159.
2018-01-25Connection::forgetRoom: Support forgetting invites tooKitsune Ral
Closes #157.
2018-01-24Fix dangling referencesKitsune Ral
2018-01-24splitMediaId: fix typos in the assertion failure messageKitsune Ral
2018-01-22splitMediaId: better assertion failure messageKitsune Ral
2018-01-14Connection: files up/downloading supportKitsune Ral
2018-01-14Connection::getThumbnail: Add an overload for QStringKitsune Ral
Connection::getThumbnail(QString,...) is better fitting to retrieve images for QML image providers - one doesn't need to create a QUrl (which if made naively ends up being incorrect) and also doesn't need to stack up "mxc://" before the mediaId. Just call Connection::getThumbnail with the id the QML engine gives you.
2018-01-09Fix an occasional crash when resolving a server nameKitsune Ral
Closes #149.
2017-12-29Use std::unique_ptr instead of bare pointers; cleanup stale declarationsKitsune Ral
2017-12-25Connection: Be more accurate with lambda capturesKitsune Ral
2017-12-21Connection::logout: supply receiver to connect(job,...)Kitsune Ral
2017-12-20Connection::accessToken - return QByteArray instead of QStringKitsune Ral
Because that's what it really is.
2017-12-19Don't use LoginJob::homeServer() anymoreKitsune Ral
Because the respective parameter in /login result is deprecated. Closes #137.
2017-12-16Connection: proactively create a Room object upon joining a roomKitsune Ral
So that clients could start using this object without waiting for the next sync.
2017-12-10Use the generated PostReceiptJob; don't compile unused job classesKitsune Ral
Rewire Connection::postReceipt() to the generated job too; this call is still deprecated though.
2017-12-10Log room creation only onceKitsune Ral
2017-12-10Fix setting the homeserver hostname (not URL) coming from /loginKitsune Ral
2017-12-07Connection: no more default to matrix.org; update HS URL from /login responseKitsune Ral
2017-12-07Generated jobs: Apply naming convention to parametersKitsune Ral
It's now camelCase everywhere, even if The Spec uses snake_case (it is not consistent in that respect).
2017-11-26Make connectToServer/connectWithToken auto-resolve HS if neededKitsune Ral
"Needed" means when the current HS URL is invalid even by its outlooks. If it is just inaccessible, no attempt to fix things will be made. This breaks compatibility with previous library behaviour because connectWithToken historically has been fully synchronous and clients depend on that. connectWithToken _may_ work synchronously if HS URL is good enough; but this is no more guaranteed. Moreover, in the future the server will be probed via /versions before working, so connectWithToken will become entirely asynchronous.
2017-11-25Make Connection::resolveServer() work as it shouldKitsune Ral
Closes #119; many thanks to @r0kk3rz for prodding me into that.