--- a/mcabber/mcabber/carbons.c Sat Oct 04 18:31:41 2014 +0200
+++ b/mcabber/mcabber/carbons.c Sat Oct 04 18:31:46 2014 +0200
@@ -45,6 +45,11 @@
}
}
+gboolean carbons_enabled()
+{
+ return (_carbons_enabled != 0);
+}
+
void carbons_enable()
{
LmMessage *iq;
--- a/mcabber/mcabber/carbons.h Sat Oct 04 18:31:41 2014 +0200
+++ b/mcabber/mcabber/carbons.h Sat Oct 04 18:31:46 2014 +0200
@@ -1,10 +1,13 @@
#ifndef __MCABBER_CARBONS_H__
#define __MCABBER_CARBONS_H__ 1
+#include <glib.h>
+
void carbons_available();
void carbons_enable();
void carbons_disable();
void carbons_info();
void carbons_reset();
+gboolean carbons_enabled();
#endif //__MCABBER_CARBONS_H__
--- 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),