Chat screen: Add "view decrypted source" option on the selected event

#1642
This commit is contained in:
manuroe
2018-08-08 16:14:56 +02:00
parent 9f7463b144
commit 7efb6d6b84
3 changed files with 23 additions and 1 deletions
+20
View File
@@ -2508,6 +2508,26 @@
}]];
}
// Add "View Decrypted Source" for e2ee event we can decrypt
if (level == 1 && selectedEvent.isEncrypted && selectedEvent.clearEvent)
{
[currentAlert addAction:[UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"room_event_action_view_decrypted_source", @"Vector", nil)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
if (weakSelf)
{
typeof(self) self = weakSelf;
[self cancelEventSelection];
// Display clear event details
[self showEventDetails:selectedEvent.clearEvent];
}
}]];
}
if (level == 1)
{