Commit 2ea47f48 authored by Richard Bayerle's avatar Richard Bayerle
Browse files

Fix bug in handling of received carbon-copied sent message.

Previously, the message was written to the sender's conversation.
In this case this is always the own account, which was probably
handled intelligently by libpurple in many, but not all, cases.

Might help with #52.
parent da9bbef1
......@@ -1976,7 +1976,7 @@ static void lurch_message_decrypt(PurpleConnection * gc_p, xmlnode ** msg_stanza
// incoming messages from the own account in MUCs are fine though
if (!g_strcmp0(sender, uname) && !g_strcmp0(type, "chat")) {
recipient_bare_jid = jabber_get_bare_jid(xmlnode_get_attrib(*msg_stanza_pp, "to"));
conv_p = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, sender, purple_connection_get_account(gc_p));
conv_p = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, recipient_bare_jid, purple_connection_get_account(gc_p));
if (!conv_p) {
conv_p = purple_conversation_new(PURPLE_CONV_TYPE_IM, purple_connection_get_account(gc_p), recipient_bare_jid);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment