/soc/2015/koosha/main: 0a6d6fa13c8e: XEP-0280 (Message Carbons):...

Koosha Khajehmoogahi koosha at posteo.de
Thu Jul 30 20:09:27 EDT 2015


Changeset: 0a6d6fa13c8eb2b9df0c692d0b5d1609a44bafd7
Author:	 Koosha Khajehmoogahi <koosha at posteo.de>
Date:	 2015-07-31 02:07 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/koosha/main/rev/0a6d6fa13c8e

Description:

XEP-0280 (Message Carbons): check for server support

diffstat:

 libpurple/protocols/jabber/disco.c      |  2 ++
 libpurple/protocols/jabber/jabber.h     |  5 +++--
 libpurple/protocols/jabber/namespaces.h |  3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)

diffs (47 lines):

diff --git a/libpurple/protocols/jabber/disco.c b/libpurple/protocols/jabber/disco.c
--- a/libpurple/protocols/jabber/disco.c
+++ b/libpurple/protocols/jabber/disco.c
@@ -582,6 +582,8 @@ jabber_disco_server_info_result_cb(Jabbe
 			js->server_caps |= JABBER_CAP_ADHOC;
 		} else if (!strcmp(NS_SIMPLE_BLOCKING, var)) {
 			js->server_caps |= JABBER_CAP_BLOCKING;
+		} else if (!strcmp(NS_CARBONS, var)) {
+			js->server_caps |= JABBER_CAP_CARBONS;
 		}
 	}
 
diff --git a/libpurple/protocols/jabber/jabber.h b/libpurple/protocols/jabber/jabber.h
--- a/libpurple/protocols/jabber/jabber.h
+++ b/libpurple/protocols/jabber/jabber.h
@@ -42,8 +42,8 @@ typedef enum {
 	JABBER_CAP_GMAIL_NOTIFY   = 1 << 9,
 	JABBER_CAP_GOOGLE_ROSTER  = 1 << 10,
 
-	JABBER_CAP_PING			  = 1 << 11,
-	JABBER_CAP_ADHOC		  = 1 << 12,
+	JABBER_CAP_PING		  = 1 << 11,
+	JABBER_CAP_ADHOC	  = 1 << 12,
 	JABBER_CAP_BLOCKING       = 1 << 13,
 
 	JABBER_CAP_ITEMS          = 1 << 14,
@@ -52,6 +52,7 @@ typedef enum {
 	JABBER_CAP_FACEBOOK       = 1 << 16,
 	JABBER_MSG_DELIVERY       = 1 << 17,
 	JABBER_MSG_REPLACE        = 1 << 18,
+	JABBER_CAP_CARBONS 	  = 1 << 19,
 	JABBER_CAP_RETRIEVED      = 1 << 31
 } JabberCapabilities;
 
diff --git a/libpurple/protocols/jabber/namespaces.h b/libpurple/protocols/jabber/namespaces.h
--- a/libpurple/protocols/jabber/namespaces.h
+++ b/libpurple/protocols/jabber/namespaces.h
@@ -98,6 +98,9 @@
 /* XEP-0264 File Transfer Thumbnails (Thumbs) */
 #define NS_THUMBS "urn:xmpp:thumbs:0"
 
+/* XEP-0280 Message Carbons */
+#define NS_CARBONS "urn:xmpp:carbons:2"
+
 /* XEP-0308 Last Message Correction */
 #define NS_MSG_REPLACE "urn:xmpp:message-correct:0"
 



More information about the Commits mailing list