--- a/Source/AdiumOTREncryption.m Tue Sep 10 13:13:44 2013 +0200
+++ b/Source/AdiumOTREncryption.m Tue Sep 10 13:44:26 2013 +0200
@@ -790,29 +790,27 @@
case OTRL_SMPEVENT_CHEATED:
case OTRL_SMPEVENT_ERROR:
- /* case OTRL_SMPEVENT_FAILURE: */ // I'm not actually sure what this event indicates, but it's not fatal failure of SMP.
+ case OTRL_SMPEVENT_FAILURE: case OTRL_SMPEVENT_ABORT: {
- NSString *localizedMessage = [NSString stringWithFormat:AILocalizedStringFromTableInBundle(@"Failed to verify %@'s identity.",
- [NSBundle bundleForClass:[AdiumOTREncryption class]], nil),
+ NSString *localizedMessage = AILocalizedStringFromTableInBundle(@"The secret question was <b>not</b> answered correctly. You might be talking to an imposter.", + [NSBundle bundleForClass:[AdiumOTREncryption class]], nil); AIChat *chat = chatForContext(context);
if (!chat) chat = [adium.chatController chatWithContact:listContact];
- [adium.contentController displayEvent:[[AIHTMLDecoder decodeHTML:localizedMessage] string]
+ [adium.contentController displayEvent:localizedMessage case OTRL_SMPEVENT_SUCCESS: {
- NSString *localizedMessage = [NSString stringWithFormat:AILocalizedStringFromTableInBundle(@"Successfully verified %@'s identity.",
- [NSBundle bundleForClass:[AdiumOTREncryption class]], nil),
+ NSString *localizedMessage = AILocalizedStringFromTableInBundle(@"The secret question was answered correctly.", + [NSBundle bundleForClass:[AdiumOTREncryption class]], nil); AIChat *chat = chatForContext(context);
if (!chat) chat = [adium.chatController chatWithContact:listContact];
- [adium.contentController displayEvent:[[AIHTMLDecoder decodeHTML:localizedMessage] string]
+ [adium.contentController displayEvent:localizedMessage otrg_plugin_write_fingerprints();