Mercurial > pidgin
changeset 27591:f44eda839ea4
explicit merge of 'c273f8da9712cac21aae5bcbd3d4790f8ee78f79'
and 'a90257133c31b066ad5d8e9df4fada3a482ccd82'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 16 Jul 2009 20:06:27 +0000 |
parents | 75e80bfa4101 (current diff) a08e84032814 (diff) |
children | c868575ded5d |
files | libpurple/protocols/jabber/message.c libpurple/protocols/jabber/presence.c |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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");
--- 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) {