changeset 17877:34411cc535de

Implemented XEP-0203: Delayed Delivery
author Andreas Monitzer <pidgin@monitzer.com>
date Wed, 20 Jun 2007 00:22:16 +0000
parents 7a3a66c6530a
children 3399dd1c258d
files libpurple/protocols/jabber/message.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c	Wed Jun 20 00:13:02 2007 +0000
+++ b/libpurple/protocols/jabber/message.c	Wed Jun 20 00:22:16 2007 +0000
@@ -373,6 +373,11 @@
 
 			g_free(code_txt);
 			g_free(text);
+		} else if(!strcmp(child->name, "delay") && xmlns && !strcmp(xmlns,"urn:xmpp:delay")) {
+			const char *timestamp = xmlnode_get_attrib(child, "stamp");
+			jm->delayed = TRUE;
+			if(timestamp)
+				jm->sent = purple_str_to_time(timestamp, TRUE, NULL, NULL, NULL);
 		} else if(!strcmp(child->name, "x")) {
 			if(xmlns && !strcmp(xmlns, "jabber:x:event")) {
 				if(xmlnode_get_child(child, "composing")) {