amiadogroup/candy — Issue #45: role/affilliation undefined  when calling Candy.View.Pane.Room.getRoom()
Author: patforg
Created: 2011-10-12 20:35:52+00:00
State: open

When I try and get the current user's role or affiliation the values are undefined although the user is the owner of the room.

The method I call is Candy.Core.getRoom(Candy.View.getCurrent().roomJid).getUser();

I also setup an presence observer Candy.Core.Event.addObserver(Candy.Core.Event.KEYS.PRESENCE, {update: function(obj, data) {
console.log(data);
return true;
}});

The room only has one user. So when I join I only get one presence event.

The currentUser.data has role and affiliation set to undefined but the user has role set to moderator and affiliation to owner.

Both objects have different values for their jids currentUser has jid of digit1345294@chat.dylg.local and user has a full jid of general@conference.chat.dylg.local/digit1345294 but they are the same user.

In my opinion both object represent the same user and should have the same values with the same jid, role and affiliation.

I'm using ejabberd 2.1.2 and candy v1.0.3-0