Fix replies to encrypted events

This commit is contained in:
Nicolas Werner 2019-11-11 19:58:20 +01:00
parent 001c94865c
commit cf88499ccb
1 changed files with 5 additions and 1 deletions

View File

@ -869,7 +869,11 @@ TimelineModel::decryptEvent(const mtx::events::EncryptedEvent<mtx::events::msg::
void
TimelineModel::replyAction(QString id)
{
auto event = events.value(id);
auto event = events.value(id);
if (auto e = boost::get<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(&event)) {
event = decryptEvent(*e).event;
}
RelatedInfo related = boost::apply_visitor(
[](const auto &ev) -> RelatedInfo {
RelatedInfo related_ = {};