1.1 --- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sat Nov 07 18:25:49 2009 -0500
1.2 +++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sun Nov 22 20:06:12 2009 -0600
1.3 @@ -1168,25 +1168,32 @@
1.4
1.5 if (listObject) {
1.6 iconPath = [listObject valueForProperty:KEY_WEBKIT_USER_ICON];
1.7 - if (!iconPath) {
1.8 + if (!iconPath)
1.9 iconPath = [listObject valueForProperty:@"UserIconPath"];
1.10 - }
1.11 +
1.12 + /* We couldn't get an icon... but perhaps we can for a parent contact */
1.13 + if (!iconPath &&
1.14 + [listObject isKindOfClass:[AIListContact class]] &&
1.15 + ([(AIListContact *)listObject parentContact] != listObject)) {
1.16 + iconPath = [[(AIListContact *)listObject parentContact] valueForProperty:KEY_WEBKIT_USER_ICON];
1.17 + if (!iconPath)
1.18 + iconPath = [[(AIListContact *)listObject parentContact] valueForProperty:@"UserIconPath"];
1.19 + }
1.20 }
1.21 [inString replaceKeyword:@"%incomingIconPath%"
1.22 withString:(iconPath ? iconPath : @"incoming_icon.png")];
1.23 -
1.24 +
1.25 AIListObject *account = chat.account;
1.26 iconPath = nil;
1.27
1.28 if (account) {
1.29 iconPath = [account valueForProperty:KEY_WEBKIT_USER_ICON];
1.30 - if (!iconPath) {
1.31 + if (!iconPath)
1.32 iconPath = [account valueForProperty:@"UserIconPath"];
1.33 - }
1.34 }
1.35 [inString replaceKeyword:@"%outgoingIconPath%"
1.36 withString:(iconPath ? iconPath : @"outgoing_icon.png")];
1.37 -
1.38 +
1.39 NSString *serviceIconPath = [AIServiceIcons pathForServiceIconForServiceID:account.service.serviceID
1.40 type:AIServiceIconLarge];
1.41