comparison libpurple/protocols/jabber/useravatar.c @ 26880:afc3ec89e83b

Revert the partial hack for ejabberd 2.0.0. See comment in code.
author Paul Aurich <paul@darkrain42.org>
date Sun, 03 May 2009 18:51:11 +0000
parents 76de9455154c
children ea2306f2f886
comparison
equal deleted inserted replaced
26879:50edd9c80577 26880:afc3ec89e83b
43 } 43 }
44 44
45 static void 45 static void
46 remove_avatar_0_12_nodes(JabberStream *js) 46 remove_avatar_0_12_nodes(JabberStream *js)
47 { 47 {
48 #if 0
49 See note below for why this is #if 0'd
50
48 /* Publish an empty avatar according to the XEP-0084 v0.12 semantics */ 51 /* Publish an empty avatar according to the XEP-0084 v0.12 semantics */
49 xmlnode *publish, *item, *metadata; 52 xmlnode *publish, *item, *metadata;
50 /* publish the metadata */ 53 /* publish the metadata */
51 publish = xmlnode_new("publish"); 54 publish = xmlnode_new("publish");
52 xmlnode_set_attrib(publish, "node", NS_AVATAR_0_12_METADATA); 55 xmlnode_set_attrib(publish, "node", NS_AVATAR_0_12_METADATA);
59 62
60 xmlnode_new_child(metadata, "stop"); 63 xmlnode_new_child(metadata, "stop");
61 64
62 /* publish */ 65 /* publish */
63 jabber_pep_publish(js, publish); 66 jabber_pep_publish(js, publish);
67 #endif
64 68
65 /* 69 /*
66 * This causes ejabberd 2.0.0 to RST our connection unceremoniously, 70 * This causes ejabberd 2.0.0 to kill the connection unceremoniously.
67 * so disable it for now (we publish a <stop/> to the metadata node 71 * See https://support.process-one.net/browse/EJAB-623. When adiumx.com
68 * instead. 72 * was upgraded, the issue went away.
73 *
74 * I think it makes a lot of sense to not have an avatar at the old
75 * node instead of having something interpreted as "no avatar". When
76 * a contact with an older client logs in, in the latter situation,
77 * there's a race between interpreting the <presence/> vcard-temp:x:update
78 * avatar (non-empty) and the XEP-0084 v0.12 avatar (empty, so show no
79 * avatar for the buddy) which leads to unhappy and confused users.
80 *
81 * A deluge of frustrating "Read error" bug reports may change my mind
82 * about this.
83 * --darkrain42
69 */ 84 */
70 #if 0
71 jabber_pep_delete_node(js, NS_AVATAR_0_12_METADATA); 85 jabber_pep_delete_node(js, NS_AVATAR_0_12_METADATA);
72 jabber_pep_delete_node(js, NS_AVATAR_0_12_DATA); 86 jabber_pep_delete_node(js, NS_AVATAR_0_12_DATA);
73 #endif
74 } 87 }
75 88
76 void jabber_avatar_set(JabberStream *js, PurpleStoredImage *img) 89 void jabber_avatar_set(JabberStream *js, PurpleStoredImage *img)
77 { 90 {
78 xmlnode *publish, *metadata, *item; 91 xmlnode *publish, *metadata, *item;