# HG changeset patch # User Marcus Lundblad # Date 1259522079 0 # Node ID 4cfa6d49bee5d2ca9d238fdd25dd9b055110313f # Parent b0f1698c52f8670ba5a140c70427dd34e57aa2df Added the "thumbs" namespace to namespaces.h Check the namespace on thumbnails elements on incoming transferes. diff -r b0f1698c52f8 -r 4cfa6d49bee5 libpurple/protocols/jabber/namespaces.h --- a/libpurple/protocols/jabber/namespaces.h Sun Nov 29 19:06:30 2009 +0000 +++ b/libpurple/protocols/jabber/namespaces.h Sun Nov 29 19:14:39 2009 +0000 @@ -85,6 +85,9 @@ /* XEP-0231 BoB (Bits of Binary) */ #define NS_BOB "urn:xmpp:bob" +/* XEP-0264 File Transfer Thumbnails (Thumbs) */ +#define NS_THUMBS "urn:xmpp:thumbs:0" + /* Google extensions */ #define NS_GOOGLE_CAMERA "http://www.google.com/xmpp/protocol/camera/v1" #define NS_GOOGLE_VIDEO "http://www.google.com/xmpp/protocol/video/v1" diff -r b0f1698c52f8 -r 4cfa6d49bee5 libpurple/protocols/jabber/si.c --- a/libpurple/protocols/jabber/si.c Sun Nov 29 19:06:30 2009 +0000 +++ b/libpurple/protocols/jabber/si.c Sun Nov 29 19:14:39 2009 +0000 @@ -1264,7 +1264,7 @@ purple_xfer_get_thumbnail_size(xfer), "image/jpeg", TRUE, jsx->js); xmlnode *thumbnail = xmlnode_new_child(file, "thumbnail"); - xmlnode_set_namespace(thumbnail, "urn:xmpp:thumbs:0"); + xmlnode_set_namespace(thumbnail, NS_THUMBS); xmlnode_set_attrib(thumbnail, "cid", jabber_data_get_cid(thumbnail_data)); xmlnode_set_attrib(thumbnail, "mime-type", "image/jpeg"); @@ -1766,7 +1766,8 @@ js->file_transfers = g_list_append(js->file_transfers, xfer); /* if there is a thumbnail, we should request it... */ - if ((thumbnail = xmlnode_get_child(file, "thumbnail"))) { + if ((thumbnail = xmlnode_get_child_with_namespace(file, "thumbnail", + NS_THUMBS))) { const char *cid = xmlnode_get_attrib(thumbnail, "cid"); if (cid) { JabberIq *request =