Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Tobias Fella <9750016+TobiasFella@users.noreply.github.com>
|
|
|
|
|
|
|
|
Co-authored-by: Nicolas Fella <6377822+nicolasfella@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove qtolm git module. Update CMakeLists.txt.
Rename olm to crypto subdir to prevent disambiguation. Rename internal
files accordingly. Comment out not ported E2EE API usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Tobias Fella <9750016+TobiasFella@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There was a lot of excess redirection in fromJson() and toJson() with
most of JsonConverter<> specialisations being unnecessary boilerplate.
These have been replaced by overloads for toJson() and explicit
specialisations for fromJson() wherever possible without breaking
the conversion logic.
|
|
Proper linters recognise that the returned types are not primitive,
while people might still be confused a bit.
|
|
In both fixed cases the callee accepts a const reference, which makes
std::move() useless. Static analyzers apparently missed them because
the cases are inside a macro.
|
|
It's might look weird; but without making fromJson() a specialisation
it becomes an overload next to an implicit specialisation of
the template function defined just above, and then loses to that
specialisation because it (also) has the perfect match.
(would be great if the compiler shaded the implicit specialisation in
such cases - alas it's not how the standard works.)
|
|
|
|
Similar to contentPart() - apparently there are enough places across
the code that would benefit from it.
|
|
Given that QJsonObject only accepts QStrings in the list constructor,
the template is useless cruft.
|
|
|
|
There's a clash between Event::content() (a template function) and
RoomMessageEvent::content() (plain member). Out of these two, the name
more fits to the RME's member function - strictly speaking,
Event::content() retrieves a part of content, and so is renamed.
In addition, contentPart() defaults to QJsonValue now, which is pretty
intuitive (the function returns values from a JSON object) and allows
to implement more elaborate logic such as
if (const auto v = contentPart<>("key"_ls); v.isObject()) {
// foo
} else if (v.isString()) {
// bar
} else {
// boo
}
|
|
|
|
This is useful for implementing Spaces support, where all events of
type `m.space.child` are needed, and we don't know their state keys in
advance.
|
|
The problem is in Room::processStateEvent(): after
potentially-inserting-nullptr into currentState, pre-check failure
(that may occur on member and trigger events for now) leaves that
nullptr in the hash map. Basically anything that uses currentState
(e.g., Room::toJson) assumes that currentState has no nullptrs - which
leads to either an assertion failure, or nullptr dereferencing. The fix
removes the nullptr placeholder if the pre-checks failed.
|