Patch from mathuaerknedam to replace status keywords in messages with blanks, and vice versa. Fixes #11872.
authorZachary West <zacw@adium.im>
Fri Oct 16 11:02:56 2009 -0400 (2009-10-16)
changeset 26181b8a3dce56d1
parent 2617 3d815231bb66
child 2619 256ec194c96e
Patch from mathuaerknedam to replace status keywords in messages with blanks, and vice versa. Fixes #11872.
Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
     1.1 --- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Fri Oct 16 11:01:08 2009 -0400
     1.2 +++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Fri Oct 16 11:02:56 2009 -0400
     1.3 @@ -869,6 +869,9 @@
     1.4  
     1.5  		NSString *displayName = [content.chat displayNameForContact:contentSource];
     1.6  		
     1.7 +		[inString replaceKeyword:@"%status%"
     1.8 +					  withString:@""];
     1.9 +
    1.10  		[inString replaceKeyword:@"%senderScreenName%" 
    1.11  					  withString:[(formattedUID ?
    1.12  								   formattedUID :
    1.13 @@ -1071,6 +1074,15 @@
    1.14  		[inString replaceKeyword:@"%statusSender%" 
    1.15  				  withString:[theSource.displayName stringByEscapingForXMLWithEntities:nil]];
    1.16  
    1.17 +		[inString replaceKeyword:@"%senderScreenName%"
    1.18 +				  withString:@""];
    1.19 +
    1.20 +		[inString replaceKeyword:@"%senderPrefix%"
    1.21 +				  withString:@""];
    1.22 +
    1.23 +		[inString replaceKeyword:@"%sender%"
    1.24 +				  withString:@""];
    1.25 +
    1.26  		if ((statusPhrase = [[content userInfo] objectForKey:@"Status Phrase"])) {
    1.27  			do{
    1.28  				range = [inString rangeOfString:@"%statusPhrase%"];