Something is puzzeling me. I login two buddies to a Zone on smartfox server. They are not joined to any room. I get the online state for each from the buddy list (that inits on login on the server) like this :
Code: Select all
id<Buddy> b = (id<Buddy>)obj;
if([[b getVariable:ReservedBuddyVariables_BV_ONLINE] getBoolValue]){
NSLog(@"Buddy is online %@", b);
}
The thing that puzzles me is that i can't get the online state for the buddy that logged in first. It is always null.
What I do is right after the onInitBuddyList delegate comes back I call this method to check for any online buddies. But none appear online even though they are.
The other device - device that logged in first - recieves the onBuddyOnlineStateUpdate, where I can update the buddy state of the 2. device with this method and it works - it shows the correct online state.
Basically this way I can not show both buddies online on both devices.
What should I do to get the online state on onInitBuddyList event for the buddy that is already logged in ?