summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <malu@pidgin.im>2009-04-17 21:29:11 +0000
committerMarcus Lundblad <malu@pidgin.im>2009-04-17 21:29:11 +0000
commit48fdf4f7401b4dbd0a1a62ecac97a4538fe23d69 (patch)
tree49842a936711523a0ba222f5d70335fbae6feb6a
parentaadad70ae888b1ee871cc8bdcbd5f43a49c4108b (diff)
downloadpidgin-48fdf4f7401b4dbd0a1a62ecac97a4538fe23d69.tar.gz
Only pre-create a PurpleConversation (if there was none yet) if an incoming
message contains custom smileys. Partly fixes the "popup a conversation window when set to hide" bug. Until I found a better way to fix entirely... Refs #7380
-rw-r--r--libpurple/protocols/jabber/message.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/libpurple/protocols/jabber/message.c b/libpurple/protocols/jabber/message.c
index adc5feac85..e75898c17c 100644
--- a/libpurple/protocols/jabber/message.c
+++ b/libpurple/protocols/jabber/message.c
@@ -626,24 +626,27 @@ void jabber_message_parse(JabberStream *js, xmlnode *packet)
purple_debug_info("jabber", "found %d smileys\n",
g_list_length(smiley_refs));
- if (jm->type == JABBER_MESSAGE_GROUPCHAT) {
- JabberID *jid = jabber_id_new(jm->from);
- JabberChat *chat = NULL;
+ if (smiley_refs) {
+ if (jm->type == JABBER_MESSAGE_GROUPCHAT) {
+ JabberID *jid = jabber_id_new(jm->from);
+ JabberChat *chat = NULL;
- if (jid) {
- chat = jabber_chat_find(js, jid->node, jid->domain);
- if (chat) conv = chat->conv;
- }
+ if (jid) {
+ chat = jabber_chat_find(js, jid->node, jid->domain);
+ if (chat) conv = chat->conv;
+ }
- jabber_id_free(jid);
- } else {
- conv =
- purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
- who, account);
- if (!conv) {
- /* we need to create the conversation here */
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
- account, who);
+ jabber_id_free(jid);
+ } else {
+ conv =
+ purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
+ who, account);
+ if (!conv) {
+ /* we need to create the conversation here */
+ conv =
+ purple_conversation_new(PURPLE_CONV_TYPE_IM,
+ account, who);
+ }
}
}
@@ -675,7 +678,7 @@ void jabber_message_parse(JabberStream *js, xmlnode *packet)
TRUE)) {
const JabberData *data =
jabber_data_find_remote_by_cid(cid);
- /* if data is already known, we add write it immediatly */
+ /* if data is already known, we write it immediatly */
if (data) {
purple_debug_info("jabber",
"data is already known\n");