cpw.qulogic.msn: 2081dc33: When receiving an MSN custom smiley, loo...
qulogic at pidgin.im
qulogic at pidgin.im
Tue Jul 8 22:25:59 EDT 2008
-----------------------------------------------------------------
Revision: 2081dc33bc0657496c17f737f0f6d2f54479c246
Ancestor: e603fdf2cf4c4f50cb0b4be229136945b807af8f
Author: qulogic at pidgin.im
Date: 2008-06-29T19:17:26
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/2081dc33bc0657496c17f737f0f6d2f54479c246
Modified files:
libpurple/protocols/msn/slp.c
ChangeLog:
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.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c ea48d02a103d8b69b43a07c444b9fc9fb1cfdfe4
+++ libpurple/protocols/msn/slp.c 2a66cdc113533d65954b55af09cddca1e4ada3ed
@@ -782,16 +782,13 @@ got_emoticon(MsnSlpCall *slpcall,
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 @@ msn_emoticon_msg(MsnCmdProc *cmdproc, Ms
{
MsnSession *session;
MsnSlpLink *slplink;
+ MsnSwitchBoard *swboard;
MsnObject *obj;
char **tokens;
char *smile, *body_str;
@@ -848,8 +846,9 @@ msn_emoticon_msg(MsnCmdProc *cmdproc, Ms
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
More information about the Commits
mailing list