adium 5698:d17464eeb2d7: Made sure SMP failures are reported aga...
commits at adium.im
commits at adium.im
Tue Sep 10 11:45:08 UTC 2013
details: http://hg.adium.im/adium/rev/d17464eeb2d7
revision: 5698:d17464eeb2d7
branch: libotr4.0.0
author: Thijs Alkemade <me at thijsalkema.de>
date: Tue Sep 10 13:44:26 2013 +0200
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.
diffs (42 lines):
diff -r 70a132bee786 -r d17464eeb2d7 Source/AdiumOTREncryption.m
--- 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();
More information about the commits
mailing list