From 853885e46b11ffae343c8e4ea0d62e5fd348be16 Mon Sep 17 00:00:00 2001 From: giomfo Date: Thu, 10 Nov 2016 10:24:59 +0100 Subject: [PATCH] End-to-end encryption UI/UX #723 Patch: Display the verified icon on outgoing messages in the encrypted rooms (until #773 is fixed) --- .../Encryption/RoomEncryptedDataBubbleCell.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Vector/Views/RoomBubbleList/Encryption/RoomEncryptedDataBubbleCell.m b/Vector/Views/RoomBubbleList/Encryption/RoomEncryptedDataBubbleCell.m index 6edf8f2035..dea01bf250 100644 --- a/Vector/Views/RoomBubbleList/Encryption/RoomEncryptedDataBubbleCell.m +++ b/Vector/Views/RoomBubbleList/Encryption/RoomEncryptedDataBubbleCell.m @@ -26,7 +26,17 @@ + (UIImage*)encryptionIconForEvent:(MXEvent*)event andSession:(MXSession*)sessio if (!event.isEncrypted) { - encryptionIcon = @"e2e_unencrypted"; + // Patch: Display the verified icon on outgoing messages in the encrypted rooms (until #773 is fixed) + MXRoom *room = [session roomWithRoomId:event.roomId]; + if (room.state.isEncrypted && session.crypto && [event.sender isEqualToString:session.myUser.userId]) + { + // The outgoing message are encrypted by default + encryptionIcon = @"e2e_verified"; + } + else + { + encryptionIcon = @"e2e_unencrypted"; + } } else if (event.decryptionError) {