Adium

Changeset 23997

Show
Ignore:
Timestamp:
06/15/2008 06:32:55 PM (6 months ago)
Author:
zacw
Message:

Fix the case of a metacontact which was available on connect going away causing the "come back" event to be fired. This would occur when the cache had a nil-entry and an event fires causing the cache to be updated before the meta contact is fully away, which triggers the "came back" event. Refs #468.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/AIContactStatusEventsPlugin.m

    r23996 r23997  
    321321 
    322322                                //Update away/not-away 
    323                                 newAwayNumber = [NSNumber numberWithBool:([inObject statusType] == AIAwayStatusType)]
     323                                newAwayNumber = ([inObject statusType] == AIAwayStatusType) ? [NSNumber numberWithBool:YES] : nil
    324324                                awayChanged = [self updateCache:awayCache 
    325325                                                                                 forKey:@"Away" 
     
    327327                                                                         listObject:inObject 
    328328                                                                 performCompare:YES]; 
    329  
     329                                 
    330330                                //Update status message 
    331331                                newStatusMessage = [[inObject statusMessage] string];