pidgin: 0257ab6e: Set PURPLE_MESSAGE_RECV before receiving...
Felipe Contreras
felipe.contreras at gmail.com
Mon Apr 6 08:52:38 EDT 2009
On Mon, Apr 6, 2009 at 3:48 PM, Stu Tomlinson <stu at nosnilmot.com> wrote:
> On Mon, 2009-04-06 at 08:25 -0400, Daniel Atallah wrote:
>> On Mon, Apr 6, 2009 at 6:40 AM, <wabz at pidgin.im> wrote:
>> > ============================================================
>> > --- libpurple/server.c b9c6a880738b280c7302dd352dfe947ee3f7101e
>> > +++ libpurple/server.c 3765f51e4eaa8ab0a6b533e07c639497950eb605
>> > @@ -925,6 +925,12 @@ void serv_got_chat_in(PurpleConnection *
>> > g_return_if_fail(who != NULL);
>> > g_return_if_fail(message != NULL);
>> >
>> > + /*
>> > + * XXX: Should we be setting this here, or relying on prpls to set it?
>> > + */
>> > + if (g_strcmp0(purple_account_get_username(g->account), who))
>> > + flags |= PURPLE_MESSAGE_RECV;
>> > +
>> > for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) {
>> > conv = (PurpleConversation *)bcs->data;
>> >
>>
>> I don't think this part is necessarily right - "who" may not be your
>> account username when you're sending a message (e.g. in an XMPP
>> conference).
>
> Also the addition of g_strcmp0 (which I think is unnecessary) adds a
> requirement on GLib 2.16.
#if !GLIB_CHECK_VERSION(2,16,0)
int
g_strcmp0 (const char *str1,
const char *str2)
{
if (!str1)
return -(str1 != str2);
if (!str2)
return str1 != str2;
return strcmp (str1, str2);
}
#endif /* !GLIB_CHECK_VERSION(2,16,0) */
--
Felipe Contreras
More information about the Devel
mailing list