diff --git a/src/libneochat/eventhandler.cpp b/src/libneochat/eventhandler.cpp index adb936bf9..250102fed 100644 --- a/src/libneochat/eventhandler.cpp +++ b/src/libneochat/eventhandler.cpp @@ -448,6 +448,9 @@ QString EventHandler::getBody(const NeoChatRoom *room, const Quotient::RoomEvent [](const PollStartEvent &e) { return e.question(); }, + [](const EncryptedEvent &) { + return i18nc("@info In room list", "Encrypted event"); + }, i18n("Unknown event")); } diff --git a/src/libneochat/neochatroom.cpp b/src/libneochat/neochatroom.cpp index e83848091..e77bf2b41 100644 --- a/src/libneochat/neochatroom.cpp +++ b/src/libneochat/neochatroom.cpp @@ -359,9 +359,14 @@ const RoomEvent *NeoChatRoom::lastEvent(std::function f if (auto lastEvent = eventCast(event)) { return lastEvent; } + if (auto lastEvent = eventCast(event)) { return lastEvent; } + + if (auto lastEvent = eventCast(event)) { + return lastEvent; + } } if (m_cachedEvent != nullptr) {