[Adium-devl] PURPLE_MESSAGE_SEND

Eion Robb eion at robbmob.com
Mon Jan 7 19:07:12 UTC 2008


> Message: 3
> Date: Sun, 6 Jan 2008 22:46:57 -0500
> From: Evan Schoenberg <evan.s at dreskin.net>
> Subject: Re: [Adium-devl] PURPLE_MESSAGE_SEND
> To: Adium Development mailing list <adium-devl at adiumx.com>
> Message-ID: <501734DE-CBD5-42DB-99A4-E1D3DC819733 at dreskin.net>
> Content-Type: text/plain; charset="us-ascii"
>
>
> On Jan 6, 2008, at 10:37 PM, Eion Robb wrote:
>
>> So before I try and fix it, is there any good reason that Adium
>> ignores
>> PURPLE_MESSAGE_SEND flagged IM's?
---snip---
>
> Every message sent gets mirrored back to adiumPurpleConvWriteIm() by
> libpurple with PURPLE_MESSAGE_SEND in its flags.  Adium displays the
> message itself before passing the information to the account for
> sending; not ignoring this information would result in every sent
> message being displayed twice in the current setup.  (The above reads
> the same to me as the comment in adiumPurpleConversation - if it
> clarifies it for you, could you point out what was confusing compared
> to your new understanding?  If it doesn't, I'll be happy to discuss it
> further.)

I guess this is just another one of those surprises I'm getting from
having different functionality to what Pidgin does. :) Then again, when
I've been trialing it, if I send a PURPLE_MESSAGE_SEND event through
serv_got_im which is already displayed, it doubles up on it.  I guess what
I'm saying is, does Purple still send PURPLE_MESSAGE_SEND events since the
flag check was put into Adium?

The cryptic bit I guess, is that in this case, libpurple isn't "sending a
sent message back to us", its receiving a message from the current account
to another user and needs to display it in the IM window.

> I'm definitely open to suggestions as to how to make any part of Adium
> better, including this - please don't take That's The Way It Is as
> implying That's The Way It Must Be, at any level of the program.
> Sometimes improvements only become clear as a need arrives and not
> before.

I did find a potential solution for it though: the ignoring of
PURPLE_MESSAGE_SEND (for IM messages at least) occurs in two places, once
in [adiumPurpleConversation adiumPurpleConvWriteIm] and once in
[CBPurpleAccount receivedIMChatMessage].  Since CBPurpleAccount is
normally overridden in protocols, the check could be removed from
adiumPurpleConversation, and just kept in CBPurpleAccount, so that I could
change the behaviour.

Another solution might be to not display sent messages in Adium using the
current method, and display them when a PURPLE_MESSAGE_SEND message comes
back from libpurple?  Don't like this one as much though, could have nasty
side-effects on other parts that I don't know about.

Cheers,
--Eion





More information about the devel mailing list