aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-01BaseJob: use QDebugStateSaverKitsune Ral
...instead of copying the whole QDebug object.
2018-03-31Merge branch 'kitsune-install-target'Kitsune Ral
Closes #113.
2018-03-31Make and install CMake config package; provide examples/CMakeLists.txt using itKitsune Ral
2018-03-31BaseJob::gotReply(): Minor fix in loggingKitsune Ral
2018-03-31Install CMake files to the proper placeKitsune Ral
2018-03-31Move source files to a separate folderKitsune Ral
It's been long overdue to separate them from the rest of the stuff (docs etc.). Also, this allows installing to a directory within the checked out git tree (say, ./install/, similar to ./build/).
2018-03-31Merge branch 'master' into kitsune-gtadKitsune Ral
2018-03-30Introduce install target for the libraryKitsune Ral
Closes #113.
2018-03-29Room: Track encryption state and do not allow sending (unencrypted) messages ↵Kitsune Ral
to it Closes #138. This is of course not encryption support yet, rather a safeguard for rooms that use encryption.
2018-03-28BaseJob: Dump error body (if there's any) to logs; detect error 429 more ↵Kitsune Ral
reliably
2018-03-28BaseJob: more improvements in logging and errors detectionKitsune Ral
2018-03-28BaseJob: Process error 429 (Too Many Requests)Kitsune Ral
The job will retry after the period either advised by the server or the default retry period. Closes #186.
2018-03-28BaseJob: small refactoring and cleanup in logging codeKitsune Ral
2018-03-28Merge branch 'kitsune-unread-messages-count'Kitsune Ral
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