Hi, I got some problems with adding buddy and granting subscritptions.
I’'m doing a a simple client that grant subscription automatically.
This is the addBuddy Function :
public function addBuddy(jid:String){
var realJID = jid.split("/")[0]; // remove /xiff from JID
this.buddyRoster.addContact(realJID,realJID , null, false);
this.buddyRoster.grantSubscription(realJID, true);
}
and this is the “subscriptionRequest” handler:
public function onSubscriptionRequest(evt){
this.buddyRoster.grantSubscription(evt.jid, false);
this.buddyRoster.fetchRoster();
}
All seem work well, except that I’'ve to do a fetchRoster after granting subscription to se the new contact in the roster.
When I do so, the new contact “show” value is always unavailable.
This doesn’'t seems a subscription problem, because if I log out and then log in, the new contact status is “normal”.
Any idea?
Thanks in advance
Marco Nava