serge
1
Hi, there are problems with handling response for addContact, removeContact in Roster.as
It seems to me that problems have the same nature.
For removeContact: (Roster.as) function handleEvent, case RosterExtension.NS ( == “jabber:iq:roster”):
var ext:RosterExtension = tempIQ.getAllExtensionsByNS( RosterExtension.NS )[0];
var rosterItem = ext.getAllItems()[0];
I got: ext = undefined
(but RECEIVED:
Is there problem with getAllExtensionsByNS?
So “handleEvent” added to roster null contact!
For addContact:
RECEIVED: Friends
as well added null contact to the roster [same reason - ext is undefined, “handleEvent” adds null Contact]
Could somebody help with the matter?
I am also getting this problem, has anyone found a solution??
I was asking about this in a thread called ‘‘IQ handling’’ a few weeks ago.
Sean Voisen said he’'d look into it so I left it there for the time being.
Any updates would be appreciated.
thanks.
It is logged into JIRA as XIFF-10. I’'ll attempt to recreate the issue and start working on a fix.
I’‘m not sure about this, but it works… I’'m not solving it in a very clean way…
I used to do that on the old 200B1! (maybe the problem have been solved, but I tried the 200B3 and found the same problem… So used the same solution)
The task is to edit Roster.as
public function removeContact( id:String ):Void
{
–
I CUT TO MAKE IT SHORT–
[/i]
myConnection.send( tempIQ );
//BEGIN MODIFICATION
rosterItems.removeItemAt(i);[/b]
//END MODIFICATION
return;
}
}
}
private function addRosterItem( jid:String, displayName:String, show:String, status:String, group:String, type:String ):Void
{
// If no displayName, use the jid
if( displayName == null ) displayName = jid;
var tempRI = {jid:jid, displayName:displayName, group:group, subscribeType:type, status:status, show:show, priority:null};
//BEGIN MODIFICATION
if(jid!=undefined)[/b]
//END MODIFICATION
rosterItems.addItem( tempRI );
}
And that’'s all.
I hope it will help somebody waiting for the real fix.