about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorOlivier LE MOAL <olivier.lemoal@winamax.fr>2015-02-23 10:47:54 +0100
committerOlivier LE MOAL <olivier.lemoal@winamax.fr>2015-02-23 10:47:54 +0100
commitced5a8c2e0cabe831890858d74c7d05f9c211ea7 (patch)
tree1dd77b9e78e47b46525eecb061b280d10d3d467b
parent48f9f3b3b0d4e12f55ba5ea2c34695e899916c3d (diff)
parent3eeafa2277c6e3002d5f8cc1aa645701527942c8 (diff)
downloadprofani-tty-ced5a8c2e0cabe831890858d74c7d05f9c211ea7.tar.gz
merge
-rw-r--r--src/xmpp/message.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 4f341f6a..73b29b91 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -434,6 +434,11 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
         gchar *to = xmpp_stanza_get_attribute(message, STANZA_ATTR_TO);
         gchar *from = xmpp_stanza_get_attribute(message, STANZA_ATTR_FROM);
 
+        // happens when receive a carbon of a self sent message 
+        if(to == NULL) {
+            to = from;
+        }
+
         Jid *jid_from = jid_create(from);
         Jid *jid_to = jid_create(to);
         Jid *my_jid = jid_create(jabber_get_fulljid());
@@ -541,4 +546,4 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
         jid_destroy(jid);
         return 1;
     }
-}
\ No newline at end of file
+}