From 47a5952c2ac0781cf8c2e2187f6dcd263187fca5 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sat, 11 May 2024 10:49:22 +0000 Subject: [PATCH] Use new libquotient functionality to encrypt direct chats by default Needs https://github.com/quotient-im/libQuotient/pull/730 --- src/main.cpp | 2 ++ src/neochatconnection.cpp | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 85d20d786..5164b5d77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #ifdef Q_OS_ANDROID #include @@ -174,6 +175,7 @@ int main(int argc, char *argv[]) initLogging(); Connection::setEncryptionDefault(true); + Connection::setDirectChatEncryptionDefault(true); #ifdef NEOCHAT_FLATPAK // Copy over the included FontConfig configuration to the diff --git a/src/neochatconnection.cpp b/src/neochatconnection.cpp index b7f977376..edec55456 100644 --- a/src/neochatconnection.cpp +++ b/src/neochatconnection.cpp @@ -384,9 +384,6 @@ void NeoChatConnection::openOrCreateDirectChat(User *user) } } requestDirectChat(user->id()); - connectSingleShot(this, &Connection::directChatAvailable, this, [=](auto room) { - room->activateEncryption(); - }); } qsizetype NeoChatConnection::directChatNotifications() const