| | 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 | |
|---|