Some test like:
(...)
emite.receives("<presence to='user@domain/resource'
from='room1@domain/otherUser2'>"
+ "<priority>0</priority><x xmlns='vcard-temp:x:update'>"
+ "<photo>af70fe6519d6a27a910c427c3bc551dcd36073e7</photo></x>"
+ "<x xmlns='http://jabber.org/protocol/muc#user'>"
+ "<item jid='otheruserjid@domain/otherresoruce'
affiliation='none' "
+ "role='participant'/></x></presence>");
assertEquals(1, room.getOccupantsCount());
Occupant user = room.findOccupant(uri("room1@domain/otherUser2"));
assertNotNull(user1);
assertEquals(Affiliation.none, user.getAffiliation());
assertEquals(Role.participant, user.getRole());
(...)
fails. Any gmail account with photo avatar will fail (I think).
Trying to fix it (only testing in local without touch the svn repo), I see
that maybe getChildren is not working well:
/**
* @see http://www.xmpp.org/extensions/xep-0045.html#createroom
*/
private void eventPresence(final Presence presence) {
(...)
List<? extends IPacket> xtensions = presence.getChildren("x");
// ****** xtensions is always empty ******
for (Iterator iterator = xtensions.iterator();
iterator.hasNext();) {
IPacket xtension = (IPacket) iterator.next();
if (xtension.hasAttribute("xmlns",
"http://jabber.org/protocol/muc#user")) {
(...)
Original issue reported on code.google.com by vruiz.ju...@gmail.com on 7 May 2008 at 1:39
Original issue reported on code.google.com by
vruiz.ju...@gmail.com
on 7 May 2008 at 1:39