diff options
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index bcbb121b..fb65fd84 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -3020,3 +3020,12 @@ bool MemberSorter::operator()(User* u1, QStringView u2name) const return n1.localeAwareCompare(n2) < 0; } + +void Room::activateEncryption() +{ + if(usesEncryption()) { + qCWarning(E2EE) << "Room" << objectName() << "is already encrypted"; + return; + } + setState<EncryptionEvent>(EncryptionEventContent::MegolmV1AesSha2); +} |