Mercurial > pidgin
changeset 23511:7fc1fa02184a
When receiving an MSN custom smiley, look at the switchboard for the
PurpleConversation, instead of searching for it. This should make
receiving a smiley in a chat go to the chat window, instead of opening a
new conversation with the buddy.
References #3264.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 29 Jun 2008 19:17:26 +0000 |
parents | 9b58bc7adfc7 |
children | f1ff35d14a95 |
files | libpurple/protocols/msn/slp.c |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c Sat Jun 28 08:08:22 2008 +0000 +++ b/libpurple/protocols/msn/slp.c Sun Jun 29 19:17:26 2008 +0000 @@ -782,16 +782,13 @@ got_emoticon(MsnSlpCall *slpcall, const guchar *data, gsize size) { - PurpleConversation *conv; - PurpleConnection *gc; - const char *who; + MsnSwitchBoard *swboard; - gc = slpcall->slplink->session->account->gc; - who = slpcall->slplink->remote_user; + swboard = slpcall->slplink->swboard; + conv = swboard->conv; - if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, gc->account))) { - + if (conv) { /* FIXME: it would be better if we wrote the data as we received it instead of all at once, calling write multiple times and close once at the very end @@ -809,6 +806,7 @@ { MsnSession *session; MsnSlpLink *slplink; + MsnSwitchBoard *swboard; MsnObject *obj; char **tokens; char *smile, *body_str; @@ -848,8 +846,9 @@ slplink = msn_session_get_slplink(session, who); - conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, - session->account); + swboard = cmdproc->data; + slplink->swboard = swboard; + conv = swboard->conv; /* If the conversation doesn't exist then this is a custom smiley * used in the first message in a MSN conversation: we need to create