From 89e42dbc539ccba8ea7d284f1ce2a8bf7a8ec4ea Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 11 Jan 2026 18:28:23 -0500 Subject: [PATCH] Decrypt when downloading single events from the server This fixes issues like not being able to view pinned messages in encrypted rooms. --- src/libneochat/neochatroom.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libneochat/neochatroom.cpp b/src/libneochat/neochatroom.cpp index 7a0a7a76c..c88dafbd0 100644 --- a/src/libneochat/neochatroom.cpp +++ b/src/libneochat/neochatroom.cpp @@ -1657,6 +1657,12 @@ void NeoChatRoom::downloadEventFromServer(const QString &eventId) } event_ptr_tt event = fromJson>(job->jsonData()); + if (auto encEv = eventCast(event.get())) { + auto decryptedEvent = decryptMessage(*encEv); + if (decryptedEvent) { + event = std::move(decryptedEvent); + } + } m_extraEvents.push_back(std::move(event)); Q_EMIT extraEventLoaded(eventId); },