diff options
-rw-r--r-- | lib/connection.cpp | 2 | ||||
-rw-r--r-- | lib/room.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 2864f3b3..b87610b7 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -1862,7 +1862,7 @@ void Connection::Private::loadOutdatedUserDevices() }); } -void Connection::newEncryptedRoom(Room *room) +void Connection::encryptionUpdate(Room *room) { for(const auto &user : room->users()) { if(!d->trackedUsers.contains(user->id())) { diff --git a/lib/room.cpp b/lib/room.cpp index b6022f1b..2707842c 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -476,7 +476,12 @@ Room::Room(Connection* connection, QString id, JoinState initialJoinState) return this == r; // loadedRoomState fires only once per room }); connectSingleShot(this, &Room::encryption, this, [=](){ - connection->newEncryptedRoom(this); + connection->encryptionUpdate(this); + }); + connect(this, &Room::userAdded, this, [=](){ + if(usesEncryption()) { + connection->encryptionUpdate(this); + } }); qCDebug(STATE) << "New" << terse << initialJoinState << "Room:" << id; } |