aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
AgeCommit message (Collapse)Author
2018-05-03Preempt jobs/joinroomjob.* with jobs/generated/joining.*Kitsune Ral
Enables responding to third-party invites.
2018-05-03GetRoomEventsJob (replaces RoomMessagesJob) + refactoringKitsune Ral
1. Updates in this commit (see further) allow to generate and build GetRoomEventsJob from message_pagination.yaml; this job completely preempts RoomMessagesJob. 2. EventsBatch<> is no more a thing; there's EventsArray<> to replace it but it's loaded from a JSON array rather than an event batch (a JSON array inside another JSON object). SyncJob that used it extensively has been moved to "conventional" containers (Events, RoomEvents and the newly introduced StateEvents). RoomMessagesJob that also used EventsBatch<> is decommissioned (see above). 3. RoomEventsRange is now an alias for Range<RoomEvents>, defined in util.h (otherwise almost the same). 4. Connection::getMessages() is no more. Use Room::getPreviousContent() and Connection::callApi<GetRooMEventsJob>() instead. 5. Moving things around in Room, since SyncJob now supplies state events in more specific StateEvents, rather than RoomEvents.
2018-05-01Event and Room: further abstract event pointersKitsune Ral
So that eventual switch from std::unique_ptr to some other pointer (as a case - QSharedPointer) would be as painless as possible.
2018-04-27Cache bridge names along with user namesKitsune Ral
Otherwise the bridge is forgotten after restart. This bumps the cache version.
2018-04-27Fix broken User::displayName() logicKitsune Ral
Also, add an assert to Connection::user() to make sure it doesn't create users with invalid ids. Closes #201.
2018-04-13Support Qt 5.4Kitsune Ral
That is until ubports move to xenial.
2018-04-05Unofficially relax Qt requirement to 5.5.1Kitsune Ral
This is to support uMatriks that still has to compile on xenial codebase.
2018-04-03DirectChatEvent: be careful with range-for over temporariesKitsune Ral
...because temporaries returned by temporaries tend to disappear before you enter the loop body (see the bottom of http://en.cppreference.com/w/cpp/language/range-for#Explanation).
2018-04-02Fixes according to results of static analysisKitsune Ral
Many thanks to clang-tidy and clazy authors for the tools, and to Qt Creator developers for making them easily available in the IDE.
2018-04-02Be more cautious with rvaluesKitsune Ral
Clang on FreeBSD doesn't seem to be playing nice in Release configuration. See the comment in the committed code.
2018-04-02Room/Connection: accountData()/accountDataChanged()Kitsune Ral
Generic account data are at least readable now (you can get, say, pushers from the library without it even being aware of what a pusher is).
2018-04-01Pass actual changes with Connection::directChatsListChanged()Kitsune Ral
Also: provide Connection::directChats() to get the whole direct chats map.
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/).