End-to-end encryption UI/UX

#723

Patch: Display the verified icon on outgoing messages in the encrypted rooms (until #773 is fixed)
This commit is contained in:
giomfo
2016-11-10 10:24:59 +01:00
parent 77ec06b131
commit 859e9e582a
@@ -26,7 +26,17 @@ NSString *const kRoomEncryptedDataBubbleCellTapOnEncryptionIcon = @"kRoomEncrypt
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)
{