# HG changeset patch # User Paul Aurich # Date 1247774787 0 # Node ID f44eda839ea444d60fd77294a94cbffc68d193e1 # Parent 75e80bfa4101beb82ed845653304c3faeab0ddef# Parent a08e8403281400dc72d708a759a9197aecd19d0e explicit merge of 'c273f8da9712cac21aae5bcbd3d4790f8ee78f79' and 'a90257133c31b066ad5d8e9df4fada3a482ccd82' diff -r 75e80bfa4101 -r f44eda839ea4 libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Thu Jul 16 20:05:08 2009 +0000 +++ b/libpurple/protocols/jabber/message.c Thu Jul 16 20:06:27 2009 +0000 @@ -742,7 +742,12 @@ if(timestamp) jm->sent = purple_str_to_time(timestamp, TRUE, NULL, NULL, NULL); } else if(!strcmp(child->name, "x")) { - if(!strcmp(xmlns, "jabber:x:conference") && + if(!strcmp(xmlns, "jabber:x: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(xmlns, "jabber:x:conference") && jm->type != JABBER_MESSAGE_GROUPCHAT_INVITE && jm->type != JABBER_MESSAGE_ERROR) { const char *jid = xmlnode_get_attrib(child, "jid"); diff -r 75e80bfa4101 -r f44eda839ea4 libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Thu Jul 16 20:05:08 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Thu Jul 16 20:06:27 2009 +0000 @@ -613,7 +613,7 @@ /* The rest of the cases used to check xmlns individually. */ continue; } else if(!strcmp(y->name, "delay") && !strcmp(xmlns, "urn:xmpp:delay")) { - /* XXX: compare the time. urn:xmpp:delay can happen on presence packets that aren't really and truly delayed */ + /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ delayed = TRUE; stamp = xmlnode_get_attrib(y, "stamp"); } else if(!strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) { @@ -621,7 +621,11 @@ } else if (g_str_equal(y->name, "nick") && g_str_equal(xmlns, "http://jabber.org/protocol/nick")) { nickname = xmlnode_get_data(y); } else if(!strcmp(y->name, "x")) { - if(!strcmp(xmlns, "http://jabber.org/protocol/muc#user")) { + if(!strcmp(xmlns, "jabber:x:delay")) { + /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ + delayed = TRUE; + stamp = xmlnode_get_attrib(y, "stamp"); + } else if(!strcmp(xmlns, "http://jabber.org/protocol/muc#user")) { } else if(!strcmp(xmlns, "vcard-temp:x:update")) { xmlnode *photo = xmlnode_get_child(y, "photo"); if(photo) {