fix: Dont enable encryption with bots

This commit is contained in:
Krille Fear 2021-11-13 11:51:35 +01:00
commit fcb9629525
4 changed files with 2 additions and 41 deletions

View file

@ -27,14 +27,6 @@ class ProfileBottomSheet extends StatelessWidget {
context: context,
future: () async {
final roomId = await client.startDirectChat(userId);
if (client.getRoomById(roomId) == null) {
await client.onSync.stream.firstWhere(
(sync) => sync.rooms?.join?.containsKey(roomId) ?? false);
}
final room = client.getRoomById(roomId);
if (client.encryptionEnabled && !room.encrypted) {
await client.getRoomById(roomId).enableEncryption();
}
return roomId;
},
);