Age | Commit message (Collapse) | Author |
|
Besides having a misleading name (and it goes back to the spec),
EncryptedFile under `file` key preempts the `url` (or `thumbnail_url`)
string value so only one of the two should exist. This is a case for
using std::variant<> - despite its clumsy syntax, it can actually
simplify and streamline code when all the necessary bits are in place
(such as conversion to JSON and getting the common piece - the URL -
out of it). This commit replaces `FileInfo::url` and `FileInfo::file`
with a common field `source` of type `FileSourceInfo` that is an alias
for a variant type covering both underlying types; and `url()` is
reintroduced as a function instead, to allow simplified access
to whichever URL is available inside the variant.
Oh, and EncryptedFile is EncryptedFileMetadata now, to clarify that it
does not represent the file payload itself but rather the data necessary
to obtain that payload.
|
|
|
|
This macro was defined in accountdataevents.h but adding one more
parameter (base class) makes it applicable to pretty much any event
with the content that has one key-value pair (though state events
already have a non-macro solution in the form of
`StateEvent<EventContent::SingleKeyValue>`). Now CustomEvent definition
in quotest.cpp can be replaced with a single line.
|
|
This makes it easier and more intuitive to build a minimal JSON payload
for a given event type. A common basicJson() call point is also
convenient in template contexts (see next commits).
|
|
This test was very unreliable because memberRenamed() signal was emitted
upon lazy-loading of past member renames. The new code connects to
aboutToAddNewMessages() instead, which should only contain the latest
renaming event (past events are delivered in the 'state' object).
|
|
RelatesTo and EventRelation have been two means to the same end in two
different contexts. (Modernised) EventRelation is the one used now both
for ReactionEvent and EventContent::TextContent. The modernisation
mostly boils down to using inline variables instead of functions to
return relation types and switching to QLatin1String from const char*
(because we know exactly that those constants are Latin-1 and
QLatin1String is more efficient than const char* to compare/convert to
QString).
|
|
|
|
This seems to be the crux of #413.
|
|
|
|
|
|
Also: extended quotest to cover member renames, not just user profile renames.
|
|
|
|
It has not much to do with the Visitor design pattern; also,
std::visit() has different conventions on the order of parameters.
|
|
...such as stuck login or failure to join the room. Closes #496.
|
|
|
|
|
|
|
|
|
|
|
|
RoomAliasesEvent is no more even registered (meaning that the library
will load m.room.aliases as unknown state events); quotest code updated
to use historyEdge() instead of timelineEdge().
|
|
9a5fa623 dropped one of RoomMessageEvent constructors for Qt 6 in order
to address #483 - breaking the build with Qt 6 along the way, as
Room::postFile() relied on that constructor. This commit changes
Room::postFile() in turn, deprecating the current signature and adding
a new one that accepts an EventContent object rather than a path to
a file. In order to achieve that, FileInfo and ImageInfo classes have
gained new constructors that accept QFileInfo instead of the legacy
series of parameters, streamlining usage of EventContent structures.
|
|
|
|
As per the latest iteration of MSC2312, room/, user/ and event/ are
only supported for parsing and replication but not for emitting from
Matrix identifiers.
(cherry picked from commit 86f24d1ecf300b82b3a7253b81a2c392669d2c2b)
|
|
Load user info (display name + avatar) for the local user.
|
|
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
|
|
|
|
- The feature summary is only generated at the end of the configuration.
- InstallQuotest feature is defined in quotest/CMakeLists.txt now,
and therefore is only available if quotest is getting built
(i.e., if BUILD_TESTING is on).
- API generation configuration code merged from two places into one.
|
|
|
|
|
|
|
|
|