aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 7ac3463e..1af294a7 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -2580,8 +2580,14 @@ Room::Changes Room::processStateEvent(const RoomEvent& e)
// clang-format off
}
, [this, oldEncEvt = static_cast<const EncryptionEvent*>(oldStateEvent)](
- const EncryptionEvent&) {
+ const EncryptionEvent& ee) {
// clang-format on
+ if (ee.algorithm().isEmpty()) {
+ qWarning(STATE)
+ << "The encryption event for room" << objectName()
+ << "doesn't have 'algorithm' specified - ignoring";
+ return NoChange;
+ }
if (oldEncEvt
&& oldEncEvt->encryption() != EncryptionEventContent::Undefined) {
qCWarning(STATE) << "The room is already encrypted but a new"