adium/adium

Parents c304336ed0f2
Children 59de9d0009e1
Always look up the master context, but look up the security properties of the most recent subcontext, when available.

Fixes #16399
--- 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);