Adium

Ticket #6866: ticket6866-fix-rev0.diff

File ticket6866-fix-rev0.diff, 1.8 kB (added by CalganX, 2 years ago)
  • Source/AIAbstractLogViewerWindowController.h

    old new  
    144144        NSNumber                        *allContactsIdentifier; 
    145145        //Old 
    146146        BOOL showEmoticons; 
     147        BOOL replaceUID; 
    147148} 
    148149 
    149150+ (id)openForPlugin:(id)inPlugin; 
  • Source/AIAbstractLogViewerWindowController.m

    old new  
    744743                        } 
    745744                } 
    746745                 
     746                //Replace From- and To-UIDs with actual aliases 
     747                replaceUID = YES; 
     748                if (replaceUID) { 
     749                        // Get ListObject for to-UID 
     750                        AIListObject *listObject = [[adium contactController] existingListObjectWithUniqueID:[AIListObject internalObjectIDForServiceID:[theLog serviceClass] 
     751                                                                                                                                                                                                                                                                                UID:[theLog to]]]; 
     752                        if (listObject) { 
     753                                // Replace TO-UID occurences 
     754                                NSString *aliasToString = [NSString stringWithFormat:@"%@", [listObject longDisplayName]]; 
     755                                NSLog(@"(To) Replacing %@ with %@", [theLog to], aliasToString); 
     756                                 
     757                                [displayText replaceOccurrencesOfString:[theLog to] withString:aliasToString options:NSLiteralSearch range:NSMakeRange(0, [displayText length])]; 
     758                        } 
     759                         
     760                        // Replace TO-UID occurences 
     761                        NSString *aliasFromString = [NSString stringWithFormat:@"%@", [[[[adium accountController] accounts] objectAtIndex:0] displayName]]; 
     762                        NSLog(@"(From) Replacing %@ with %@", [theLog from], aliasFromString); 
     763                         
     764                        [displayText replaceOccurrencesOfString:[theLog from] withString:aliasFromString options:NSLiteralSearch range:NSMakeRange(0, [displayText length])]; 
     765                } 
     766 
    747767                appendedFirstLog = YES; 
    748768                 
    749769                [pool release];