From d2ed760ce7ad2e6c224ff70dc661045e539d8f66 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Wed, 24 Jun 2020 21:10:54 +0200 Subject: [PATCH] Ignore key sharing requests by others than us --- lib/components/matrix.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/components/matrix.dart b/lib/components/matrix.dart index 41d4cba..dc91e0c 100644 --- a/lib/components/matrix.dart +++ b/lib/components/matrix.dart @@ -170,6 +170,9 @@ class MatrixState extends State { onRoomKeyRequestSub ??= client.onRoomKeyRequest.stream.listen((RoomKeyRequest request) async { final room = request.room; + if (request.sender != room.client.userID) { + return; // ignore share requests by others + } final sender = room.getUserByMXIDSync(request.sender); if (await SimpleDialogs(context).askConfirmation( titleText: L10n.of(context).requestToReadOlderMessages,