aboutsummaryrefslogtreecommitdiff
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-26Room::updateUnreadCount(): Fix a too stringent assertionKitsune Ral
2018-03-26Fix compilation on some environmentsKitsune Ral
...where deque<>::difference_type is long rather than int.
2018-03-26Count unread messagesKitsune Ral
2018-03-26Room: isDirectChat() and directChatUsers()Kitsune Ral
isDirectChat() has been declared previously but not implemented, hence a bit of strangeness in the commit.
2018-03-26Connection::directChatUsers()Kitsune Ral
2018-03-25Merge branch 'kitsune-more-on-direct-chats'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-25One more Valgrind suppression for cases when the test run into "Too many ↵Kitsune Ral
requests"
2018-03-26Connection::room() and Connection::invitation()Kitsune Ral
2018-03-26Introduce JoinStates (QFlags<JoinState>)Kitsune Ral
This required to change numeric values for JoinState enum; so anybody who relied on them being 0-based and/or contiguous, beware.
2018-03-24.travis.yml: Escape all env variables in the configuration with 'Kitsune Ral
Not only those that already caused trouble.
2018-03-24Merge branch 'kitsune-direct-chats'Kitsune Ral
2018-03-24Work around a bug in MSVC leading to "ambiguous call" compilation errorKitsune Ral
2018-03-24Test/example for direct chats markingKitsune Ral
Also: refactored to gather up code dealing with the semaphor.
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-24Introduce DirectChatEvent (parse only, no processing yet)Kitsune Ral
2018-03-24MemberEventContent/RoomMemberEvent: parse and expose is_directKitsune Ral
2018-03-24converters.h: Make the default toJson() less greedyKitsune Ral
template<T> toJson(T&&) grabbed even things that it cannot convert, leading to unpleasant effects in a situation when all that was needed was one implicit conversion (e.g. from QList<QString> to QStringList). So now it's three trivial toJson() overloads instead of a template.
2018-03-23Room::downloadFile(): Events are constKitsune Ral
2018-03-23Room::downloadFile(): make sure to store the initiated file transfer anewKitsune Ral
QHash doesn't overwrite an entry if it already exists; this might lead to the target file name from the previous transfer kept in the table of file transfers. The commit fixes that.
2018-03-23DownloadFileJob::beforeStart(): make sure to immediately return in case of errorKitsune Ral
2018-03-23Room::downloadFile(): don't start another job if the transfer is ongoingKitsune Ral
2018-03-23BaseJob::start(): self-destruct if not succesfully startedKitsune Ral
Closes #193.
2018-03-23Room::downloadFile(): Make sure a generated file name is saneKitsune Ral
Closes #191.
2018-03-21Merge pull request #189 from r0kk3rz/masterKitsune Ral
fix error handling in loadState()
2018-03-21Fix Travis failing to build PRsKitsune Ral
2018-03-21Merge pull request #190 from krombel/ignore_content_type_appendixKitsune Ral
ignore possible appendixes from content type
2018-03-20ignore possible appendixes from content typeKrombel
Currently libqmatrixclient fails checking the `Content-Type` header when there is an appendix like "charset". That is allowed e.g. in [rfc7231](https://tools.ietf.org/html/rfc7231#section-3.1.1.5)) One example is a Content-Type `application/json` vs `application/json;charset=UTF-8` Setting of the charset appendis is currently not supported. It fails with libqmatrixclient.jobs: "LoginJob" status 106 : "Incorrect content type of the response" This PR aims to just drop that appendix as it is currently not handled somewhere else.
2018-03-19fix error handling in loadState()Lewis Rockliffe
2018-03-08User: Streamline Avatar storageKitsune Ral
Don't use pointers and explicit operator new() for Avatars now that we store them in a separate container from the avatar(url)-to-room mapping. Less heap wasted.
2018-03-08Avatar: check URLs before fetching, not on updating the URLKitsune Ral
Closes #187.
2018-03-07User: use std::unique_ptr instead of QScopedPointerKitsune Ral
Slightly safer for the case (probably).
2018-03-07Travis: Small fixes to Valgrind suppressionsKitsune Ral
2018-03-07Fix resetting the read marker if a read receipt comes from the syncKitsune Ral
Closes #184.
2018-03-07Travis: experimental Valgrind suppressions fileKitsune Ral
2018-03-07qmc-example: Fix redaction test to work even if the synced message is ↵Kitsune Ral
already redacted
2018-03-07qmc-example: Remove no more needed deleteLaterKitsune Ral
Might help with autotest segfaulting on OSX.
2018-03-07qmc-example: Ensure prerequisites before running the tagging testKitsune Ral
2018-03-06CONTRIBUTING.md: add sections on API, doc-comments; update on automatic testing.Kitsune Ral
2018-03-06Make sure the read marker is reinstated after Quaternion restartKitsune Ral
2018-03-05Merge branch 'kitsune-fully-read-marker'Kitsune Ral
2018-03-05Support server-side read marker (m.full_read)Kitsune Ral
Closes #183. There's also the m.read part but it can be done sometime later, as it's pure optimisation.
2018-03-05qmc-example: Logging tweaksKitsune Ral
2018-03-05First pieces of server-side read marker supportKitsune Ral
2018-03-05Travis: added one more parameter to qmc-exampleKitsune Ral
2018-03-05Profile-log if saving state has been interrupted by processEvents for long ↵Kitsune Ral
enough
2018-03-05qmc-example: Rewritten with a QObject for clearer dispatchingKitsune Ral