|
|
|
|
@ -886,26 +886,29 @@ public void entriesAdded(Collection<String> addresses)
|
|
|
|
|
ContactJabberImpl contact =
|
|
|
|
|
findContactById(entry.getUser());
|
|
|
|
|
|
|
|
|
|
if(contact != null && contact.isPersistent())
|
|
|
|
|
if(contact != null)
|
|
|
|
|
{
|
|
|
|
|
contact.setResolved(entry);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ContactGroup oldParentGroup =
|
|
|
|
|
contact.getParentContactGroup();
|
|
|
|
|
// if contact is in not in contact list
|
|
|
|
|
// we must remove it from there in order to correctlly
|
|
|
|
|
// process adding contact
|
|
|
|
|
// this happens if we accept subscribe request
|
|
|
|
|
// not from sip-communicator
|
|
|
|
|
if(oldParentGroup instanceof ContactGroupJabberImpl
|
|
|
|
|
&& !oldParentGroup.isPersistent())
|
|
|
|
|
if(contact.isPersistent())
|
|
|
|
|
{
|
|
|
|
|
contact.setResolved(entry);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
((ContactGroupJabberImpl)oldParentGroup)
|
|
|
|
|
.removeContact(contact);
|
|
|
|
|
fireContactRemoved(oldParentGroup, contact);
|
|
|
|
|
ContactGroup oldParentGroup =
|
|
|
|
|
contact.getParentContactGroup();
|
|
|
|
|
// if contact is in not in contact list
|
|
|
|
|
// we must remove it from there in order to correctlly
|
|
|
|
|
// process adding contact
|
|
|
|
|
// this happens if we accept subscribe request
|
|
|
|
|
// not from sip-communicator
|
|
|
|
|
if(oldParentGroup instanceof ContactGroupJabberImpl
|
|
|
|
|
&& !oldParentGroup.isPersistent())
|
|
|
|
|
{
|
|
|
|
|
((ContactGroupJabberImpl)oldParentGroup)
|
|
|
|
|
.removeContact(contact);
|
|
|
|
|
fireContactRemoved(oldParentGroup, contact);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
contact = new ContactJabberImpl(roster.getEntry(id),
|
|
|
|
|
|