* @param event
*/
private void userFailed(Element event)
{
if(this.dialog instanceof MutipartyDialog) {
MutipartyDialog cd = (MutipartyDialog) this.dialog;
List list = event.getChildren("member");
if(list!=null){
Iterator it = list.iterator();
while(it.hasNext()){
Element member = (Element) it.next();
String uri = member.getAttributeValue("uri");
Buddy buddy = this.context.getFetionStore().getBuddyByUri(uri);
//如果好友不存在,可能用户已经删除了该好友,这里新建一个临时好友对象
//仅是为了作为参数传递个对话来判断那个好友离开了对话,因为对话保留了一个好友的引用
if(buddy==null){
buddy = UriHelper.createBuddy(uri);
}
cd.buddyFailed(buddy);
logger.debug("Buddy failed to enter this dialog:"+uri);
}
}
}