Adium

Changeset 24061

Show
Ignore:
Timestamp:
06/24/2008 07:16:27 PM (7 months ago)
Author:
evands
Message:

Added -[AIAccount sendOfflineMessagesWithoutPrompting] which lets an account choose to do just that.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/Adium Framework/Source/AIAccount.h

    r23837 r24061  
    166166- (BOOL)suppressTypingNotificationChangesAfterSend; 
    167167- (BOOL)canSendOfflineMessageToContact:(AIListContact *)inContact; 
     168- (BOOL)sendOfflineMessagesWithoutPrompting; 
    168169- (BOOL)accountDisplaysFileTransferMessages; 
    169170- (BOOL)managesOwnContactIconCache; 
  • trunk/Frameworks/Adium Framework/Source/AIAccount.m

    r23992 r24061  
    339339 
    340340/*! 
    341  * @brief Support server-side storing of messages to offline users 
     341 * @brief Support server-side storing of messages to offline users? 
    342342 * 
    343343 * Some protocols store messages to offline contacts on the server. Subclasses may return YES if their service supports  
     
    346346 */ 
    347347- (BOOL)canSendOfflineMessageToContact:(AIListContact *)inContact 
     348{ 
     349        return NO; 
     350} 
     351 
     352/*! 
     353 * @brief Should offline messages be sent without prompting the user? 
     354 * 
     355 * If -[self canSendOfflineMessageToContact:] returns YES, Adium typically asks the user whether or not to send a message 
     356 * to be stored on the server. If sendOfflineMessagesWithoutPrompting returns YES, this prompt is always suppressed. 
     357 * 
     358 * This should only be true if offline messaging is a well-established expectation for the service. 
     359 */ 
     360- (BOOL)sendOfflineMessagesWithoutPrompting 
    348361{ 
    349362        return NO; 
  • trunk/Plugins/Dual Window Interface/AIMessageViewController.m

    r24060 r24061  
    433433 
    434434                AIChatSendingAbilityType messageSendingAbility = [chat messageSendingAbility]; 
    435                 if (suppressSendLaterPrompt || (messageSendingAbility == AIChatCanSendMessageNow)) { 
     435                if (suppressSendLaterPrompt || (messageSendingAbility == AIChatCanSendMessageNow) || 
     436                        ((messageSendingAbility == AIChatCanSendViaServersideOfflineMessage) && [[chat account] sendOfflineMessagesWithoutPrompting])) { 
    436437                        AIContentMessage                *message; 
    437438                        NSAttributedString              *outgoingAttributedString;