adium 5535:eaec4182935a: Always look up the master context, but ...

commits at adium.im commits at adium.im
Wed Jun 5 18:28:58 UTC 2013


details:	http://hg.adium.im/adium/rev/eaec4182935a
revision:	5535:eaec4182935a
branch:		libotr4.0.0
author:		Thijs Alkemade <me at thijsalkema.de>
date:		Wed Jun 05 20:28:42 2013 +0200

Always look up the master context, but look up the security properties of the most recent subcontext, when available.

Fixes #16399

diffs (25 lines):

diff -r c304336ed0f2 -r eaec4182935a Source/AdiumOTREncryption.m
--- a/Source/AdiumOTREncryption.m	Tue May 28 01:40:11 2013 +0200
+++ b/Source/AdiumOTREncryption.m	Wed Jun 05 20:28:42 2013 +0200
@@ -204,6 +204,7 @@
 	if (!context) return nil;
 
 	NSDictionary		*securityDetailsDict;
+	if (context->recent_child) context = context->recent_child;
 	Fingerprint *fprint = context->active_fingerprint;	
 
     if (!fprint || !(fprint->fingerprint)) return nil;
@@ -334,9 +335,10 @@
 	proto = [account.service.serviceCodeUniqueID UTF8String];
     username = [chat.listObject.UID UTF8String];
 	
-    context = otrl_context_find(otrg_plugin_userstate,
-								username, accountname, proto, OTRL_INSTAG_RECENT, 1, NULL,
-								NULL, NULL);
+
+	context = otrl_context_find(otrg_plugin_userstate,
+							   username, accountname, proto, OTRL_INSTAG_MASTER, TRUE, NULL,
+							   NULL, NULL);
 	
 	AILogWithSignature(@"%@ -> %p", chat, context);
 	




More information about the commits mailing list