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

@ -253,17 +253,6 @@ class SearchView extends StatelessWidget {
final client = Matrix.of(context).client;
final roomId = await client
.startDirectChat(foundProfile.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;
},
);