Not properly handling newly created group and added firends if were a VolatileContact

cusax-fix
Damian Minkov 19 years ago
parent 966ab2726a
commit 1b99678ddb

@ -814,12 +814,26 @@ public void friendAddedReceived(SessionFriendEvent ev)
return;
}
String contactID = ev.getFriend().getId();
ContactYahooImpl contactToAdd = findContactById(contactID);
// if group is note resolved resolve it
// this means newly created group
if(!group.isResolved())
{
YahooGroup gr = findGroup(ev.getGroup());
// if the contact is volatile me must remove it
// as new one will be created
if(contactToAdd != null && contactToAdd.isVolatile())
{
ContactGroupYahooImpl parent =
(ContactGroupYahooImpl)contactToAdd.getParentContactGroup();
parent.removeContact(contactToAdd);
fireContactRemoved(parent, contactToAdd);
}
YahooGroup gr = findGroup(ev.getGroup());
if(gr != null)
group.setResolved(gr);
@ -828,8 +842,6 @@ public void friendAddedReceived(SessionFriendEvent ev)
return;
}
String contactID = ev.getFriend().getId();
ContactYahooImpl contactToAdd = findContactById(contactID);
boolean isVolatile = false;

@ -925,6 +925,13 @@ public void processAuthorizationResponse(
private void dumplists()
{
// just wait a liitle all modification events to be received
Object o = new Object();
synchronized(o)
{
try{o.wait(3000);}catch (InterruptedException ex){}
}
OperationSetPersistentPresence op1 = (OperationSetPersistentPresence)operationSetPresence1;
OperationSetPersistentPresence op2 = (OperationSetPersistentPresence)operationSetPresence2;

Loading…
Cancel
Save