adium 5477:65883fb47e79: The assumption that + means a mobile co...
commits at adium.im
commits at adium.im
Thu May 9 12:26:24 UTC 2013
details: http://hg.adium.im/adium/rev/65883fb47e79
revision: 5477:65883fb47e79
branch: libotr4.0.0
author: Thijs Alkemade <me at thijsalkema.de>
date: Thu May 09 14:25:53 2013 +0200
The assumption that + means a mobile contact is pretty stupid, and even then that doesn't mean they can't do OTR.
diffs (46 lines):
diff -r 7bae4e81a1ce -r 65883fb47e79 Source/AdiumOTREncryption.m
--- a/Source/AdiumOTREncryption.m Thu Apr 25 00:12:24 2013 +0200
+++ b/Source/AdiumOTREncryption.m Thu May 09 14:25:53 2013 +0200
@@ -302,27 +302,21 @@
{
OtrlPolicy policy = OTRL_POLICY_MANUAL_AND_RESPOND_TO_WHITESPACE;
- //Force OTRL_POLICY_MANUAL when interacting with mobile numbers
- if ([contact.UID hasPrefix:@"+"]) {
- policy = OTRL_POLICY_MANUAL_AND_RESPOND_TO_WHITESPACE;
-
- } else {
- AIEncryptedChatPreference pref = contact.encryptedChatPreferences;
- switch (pref) {
- case EncryptedChat_Never:
- policy = OTRL_POLICY_NEVER;
- break;
- case EncryptedChat_Manually:
- case EncryptedChat_Default:
- policy = OTRL_POLICY_MANUAL_AND_RESPOND_TO_WHITESPACE;
- break;
- case EncryptedChat_Automatically:
- policy = OTRL_POLICY_OPPORTUNISTIC;
- break;
- case EncryptedChat_RejectUnencryptedMessages:
- policy = OTRL_POLICY_ALWAYS;
- break;
- }
+ AIEncryptedChatPreference pref = contact.encryptedChatPreferences;
+ switch (pref) {
+ case EncryptedChat_Never:
+ policy = OTRL_POLICY_NEVER;
+ break;
+ case EncryptedChat_Manually:
+ case EncryptedChat_Default:
+ policy = OTRL_POLICY_MANUAL_AND_RESPOND_TO_WHITESPACE;
+ break;
+ case EncryptedChat_Automatically:
+ policy = OTRL_POLICY_OPPORTUNISTIC;
+ break;
+ case EncryptedChat_RejectUnencryptedMessages:
+ policy = OTRL_POLICY_ALWAYS;
+ break;
}
return policy;
More information about the commits
mailing list