Adapt to the new inherited variant
This commit is contained in:
parent
7973fbce8c
commit
10b65b78fa
16 changed files with 99 additions and 106 deletions
|
|
@ -1273,13 +1273,13 @@ decryptEvent(const MegolmSessionIndex &index,
|
|||
body["origin_server_ts"] = event.origin_server_ts;
|
||||
body["unsigned"] = event.unsigned_data;
|
||||
|
||||
mtx::events::collections::TimelineEvent te;
|
||||
from_json(body, te);
|
||||
mtx::events::collections::TimelineEvents te =
|
||||
body.get<mtx::events::collections::TimelineEvents>();
|
||||
|
||||
// relations are unencrypted in content...
|
||||
mtx::accessors::set_relations(te.data, std::move(event.content.relations));
|
||||
mtx::accessors::set_relations(te, std::move(event.content.relations));
|
||||
|
||||
return {DecryptionErrorCode::NoError, std::nullopt, std::move(te.data)};
|
||||
return {DecryptionErrorCode::NoError, std::nullopt, std::move(te)};
|
||||
} catch (std::exception &e) {
|
||||
return {DecryptionErrorCode::ParsingFailed, e.what(), std::nullopt};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue