//If writing the file is successful, write an <IMG SRC="filepath"> tag to our string; the 'scaledToFitImage' class lets us apply CSS to directIM images only
//Suppress notification warnings we have no interest in seeing
if(secondaryString){
if((strcmp(secondary,_("Not supported by host"))==0)||/* OSCAR */
(strcmp(secondary,_("Not logged in"))==0)||/* OSCAR */
(strcmp(secondary,_("Your buddy list was downloaded from the server."))==0)||/* Gadu-gadu */
(strcmp(secondary,_("Your buddy list was stored on the server."))==0)/* Gadu-gadu */){
returnNULL;
}
if([secondaryStringisEqualToString:
[NSStringstringWithFormat:[NSStringstringWithUTF8String:_("Could not add the buddy %s for an unknown reason.")],"1"]]){
/* Rather random error displayed by OSCAR (since forever, as of libpurple 2.4.0) for some clients while connecting */
returnNULL;
}
if([secondaryStringrangeOfString:@"Your contact is using Windows Live"].location!=NSNotFound){
/* Yahoo without MSN support - English string from the server */
returnNULL;
}
}
if([primaryStringrangeOfString:@"did not get sent"].location!=NSNotFound){
//Oscar send error
//This may not ever occur as of libpurple 2.4.0; I can't find the phrase 'did not get sent' in any of the code. -evands
NSString*targetUserName=[[[[primaryStringcomponentsSeparatedByString:@" message to "]objectAtIndex:1]componentsSeparatedByString:@" did not get "]objectAtIndex:0];
errorMessage=[NSStringstringWithFormat:AILocalizedString(@"Your message to %@ did not get sent",nil),targetUserName];