adium/adium

Parents 70a132bee786
Children 7c1b8533e9e5
Made sure SMP failures are reported again. Clarified the shown messages to indicate that they can either mean that you failed to answer correctly, or your contact did.
--- 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.",
- nil,
- [NSBundle bundleForClass:[AdiumOTREncryption class]], nil),
- listContact.UID];
+ NSString *localizedMessage = AILocalizedStringFromTableInBundle(@"The secret question was <b>not</b> answered correctly. You might be talking to an imposter.",
+ nil,
+ [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
ofType:@"encryption"
inChat:chat];
break;
}
case OTRL_SMPEVENT_SUCCESS: {
- NSString *localizedMessage = [NSString stringWithFormat:AILocalizedStringFromTableInBundle(@"Successfully verified %@'s identity.",
- nil,
- [NSBundle bundleForClass:[AdiumOTREncryption class]], nil),
- listContact.UID];
+ NSString *localizedMessage = AILocalizedStringFromTableInBundle(@"The secret question was answered correctly.",
+ nil,
+ [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
ofType:@"encryption"
inChat:chat];
otrg_plugin_write_fingerprints();