diff mcabber/mcabber/xmpp.c @ 2152:2ce6dd6861ea

Use the Carbons <private/> element for outgoing encrypted messages
author Mikael Berthe <mikael@lilotux.net>
date Sat, 04 Oct 2014 18:31:46 +0200
parents 8819bab88053
children a053629321ed
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp.c	Sat Oct 04 18:31:41 2014 +0200
+++ b/mcabber/mcabber/xmpp.c	Sat Oct 04 18:31:46 2014 +0200
@@ -417,6 +417,11 @@
     g_free(enc);
   }
 
+  // We probably don't want Carbons for encrypted messages, since the other
+  // resources won't be able to decrypt them.
+  if (carbons_enabled())
+    lm_message_node_add_child(x->node, "private", NS_CARBONS_2);
+
   // XEP-0184: Message Receipts
   if (sl_buddy && xep184 &&
       caps_has_feature(buddy_resource_getcaps(sl_buddy->data, rname),