diff libpurple/protocols/jabber/message.c @ 17877:34411cc535de

Implemented XEP-0203: Delayed Delivery
author Andreas Monitzer <pidgin@monitzer.com>
date Wed, 20 Jun 2007 00:22:16 +0000
parents d8ce7ff7aeb3
children b8de63d3bf89
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")) {