Age | Commit message (Collapse) | Author |
|
|
|
Fix (IRC) bridge detection
|
|
|
|
|
|
The documentation is now more independent from Quaternion and includes
instructions not only for CMake but also for qmake. It also mentions that we
have an example console client!
|
|
Those stand for a boolean false value in Qt.labs.Settings, but plain JavaScript thinks that "false" == true so if you take a value through QMatrixClient::Settings instead of Qt.labs.Settings, you would get screwed.
|
|
This is for a case of renaming an organisation or an application
|
|
The original comment got a bit rotten, so refresh it as well.
|
|
|
|
|
|
|
|
|
|
It now allows to check what exactly has happened to the member (display name change, joining, avatar update), fixing #105.
|
|
Event::isStateEvent() is an easier way to make checking an event kind (instead of enumerating through all types corresponding to state changes). StateEvent::_prev (accessible through prev_content) should only be initialised if there's a previous state in the original JSON.
|
|
* StateEvent<> is a new class template for all state events. It provides a uniform interface to the state content, as well as a means to serialize the content back to JSON. In addition, StateEvent now parses the "prev_content" JSON object, so one can refer to the previous state now (a notable step to proper reflection of state changes in the displayed timeline in clients).
* EventContent::SimpleContent, together with StateEvent<>, forms a generalisation for simple state events, such as room name, topic, aliases etc. that boil down to a single key-value pair. DECLARE_SIMPLE_STATE_EVENT is a macro defined to streamline creation of events based on SimpleContent, providing API back-compatibility for events defined so far. As a result, a very concise simplestateevents.h replaces all those room*event.* files.
* Event/RoomEvent::fromJson() code is squeezed down to plain type lists passed to makeIfMatches() "chained factory" function template. TypeId is mandatory for an event type to be included into that factory.
* Event::toTimestamp() and Event::toStringList are completely superseded by respective fromJson<>() converters.
|
|
|
|
|
|
Event::toTimestamp() duplicates fromJson<>() code, so it should go.
|
|
We don't use them for several months already.
|
|
Because they are applicable beyond jobs.
|
|
Two changes to make EventContent hierarchy easier to understand and use:
- InfoBase is unbound from Base, and downstream classes use multiple inheritance
to work "info" objects
- MIME types are separated from Base into a separate TypedBase class because
MIME typing is not common to all content kinds.
|
|
|
|
|
|
|
|
|
|
|
|
The events are detected in /sync output, and avatars for rooms are loaded from respective URLs. Clients can use Room::avatar() method to request a pixmap of a certain size, and react to avatarChanged() in order to update the UI when new pixmaps/avatars arrive. avatarChanged() signal is overloaded with two tasks - the first firing merely indicates that a new avatar is available (without actual pixmap yet available) while the second firing means that an actual pixmap has arrived (all this is entirely transparent for clients, they just should update their pixmaps from Room::avatar() every time when Room::avatarChanged() is emitted).
|
|
|
|
Avatars are also a property of rooms, and the supporting code is basically
the same. The only thing different will be emitted signals, and the cleanest
thing to support that (aside from making Avatar a QObject) seems to be to
parameterise the thumbnail-updating logic with a continuation invoked upon
completion of the thumbnail job.
|
|
ImageContent is usable outside of m.room.message (in particular, m.room.avatar
uses the same structure for content. And EventContent::Base is very suitable to
derive from even for standard event content structures (such as in room name
events), let alone non-standard ones.
Also, renamed MessageEventContent to EventContent (for obvious reasons).
|
|
|
|
qmc-example.pro added; better CONFIG for libqmatrixclient; refreshed files list. Closes #104
|
|
|
|
Try using wildcard for qmake project file
|
|
|
|
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.
|
|
This causes enormous traffic in the logs upon every startup when
main.debug logs are on.
|
|
Closes #102.
|
|
Display name is a calculated thing, name is received from the server.
|
|
If all users suddenly don't have names, update to this commit, delete your cache and run again. Issue since 2bf912d6e6ddd9ff81a92ff28ac8c4c1d8f2d7e1.
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
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.
|