Skip to content

Commit

Permalink
End-to-end encryption UI/UX
Browse files Browse the repository at this point in the history
#723

Patch: Display the verified icon on outgoing messages in the encrypted rooms (until #773 is fixed)
  • Loading branch information
giomfo committed Nov 10, 2016
1 parent 92ca749 commit 853885e
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 853885e

Please sign in to comment.