Start adapting to libquotient crypto api changes

This commit is contained in:
Tobias Fella
2026-01-20 19:14:36 +01:00
committed by Tobias Fella
parent 9810b3dee0
commit 1ceffe6a2e
2 changed files with 8 additions and 0 deletions

View File

@@ -289,12 +289,16 @@ QVariant MessageModel::data(const QModelIndex &idx, int role) const
}
if (role == VerifiedRole) {
#ifdef RUST_CRYPTO
return m_room->connection()->isVerifiedEvent(event.value().get().id(), room());
#else
if (event.value().get().originalEvent()) {
auto encrypted = dynamic_cast<const EncryptedEvent *>(event.value().get().originalEvent());
Q_ASSERT(encrypted);
return eventRoom->connection()->isVerifiedSession(encrypted->sessionId().toLatin1());
}
return false;
#endif
}
if (role == AuthorDisplayNameRole) {