# HG changeset patch # User Elliott Sales de Andrade # Date 1214767046 0 # Node ID 7fc1fa02184ae6955e5b6d11d4d95f4e940edd1e # Parent 9b58bc7adfc797fc7df263144e64920cd870cfb8 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. diff -r 9b58bc7adfc7 -r 7fc1fa02184a libpurple/protocols/msn/slp.c --- 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