Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/chat.c @ 28775:41992511531f
jabber: Improved support for XEP-0249 (and document the legacy stuff).
Ironically, I don't think there's a way to invoke the code in chat.c as-is,
since it's specifically invoked if the server doesn't purport to be a MUC.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 17 Oct 2009 00:37:04 +0000 |
parents | 08ffa726aea2 |
children | a335d1bab20e |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/chat.c Fri Oct 16 20:22:26 2009 +0000 +++ b/libpurple/protocols/jabber/chat.c Sat Oct 17 00:37:04 2009 +0000 @@ -177,10 +177,21 @@ xmlnode_insert_data(body, msg, -1); } else { xmlnode_set_attrib(message, "to", name); + /* + * Putting the reason into the body was an 'undocumented protocol, + * ...not part of "groupchat 1.0"'. + * http://xmpp.org/extensions/attic/jep-0045-1.16.html#invite + * + * Left here for compatibility. + */ body = xmlnode_new_child(message, "body"); xmlnode_insert_data(body, msg, -1); + x = xmlnode_new_child(message, "x"); xmlnode_set_attrib(x, "jid", room_jid); + + /* The better place for it! XEP-0249 style. */ + xmlnode_set_attrib(x, "reason", msg); xmlnode_set_namespace(x, "jabber:x:conference"); }