[Adium-devl] Sending of Messages

Thomas Karpiniec arctanx.tk at gmail.com
Sun Nov 19 09:55:43 UTC 2006


Good day,

I'm a beginning Obj-C/cocoa programmer and have been looking to
contribute to Adium if I can. I have been looking at this ticket
<http://trac.adiumx.com/ticket/2269> (Add the ability to turn logging
on and off by contact) and have been trying to find the relevants
parts of the code to implement something like that, my major issue
being finding where messages are actually sent so I can identify and
modify logging. Basically I'm wondering how the message ever gets
sent. This is what I've noticed so far:

A lot of searching around has led me to -processAndSendObject in
AIContentController, which seems to identify the account and the
AIContentObject then handle it accordingly. In the case of a typing
object, it sends a sendTypingObject message and if it's a message, it
filters out file transfers, encodes the message using the relevant
account class, then finally sends a message:

if ([contentMessage encodedMessage]) {
	success = [sendingAccount sendMessageObject:contentMessage];
}

which would make sense except if I look in AIAccount.m:

/*!
 * @brief Send a message
 *
 * The content object contains all the necessary information for sending,
 * including the destination contact. [inMessageObject encodedMessage]
contains the NSString which should be sent.
 */
- (BOOL)sendMessageObject:(AIContentMessage *)inMessageObject
{
	return NO;
}

it looks like it returns a no. The sendTypingObject message doesn't
even return anything, it's completely empty. So how does the message
get anywhere?

If anyone could give me any pointers in the right direction I would
really appreciate it!

Thanks and regards,

Thomas Karpiniec




More information about the devel mailing list