//in MsnContactImpl.java
public void setEmail(Email email) {
super.setEmail(email);
if (email != null) {
if (id == null)//so, id might be never null
setId(email.getEmailAddress());
if (friendlyName == null)
setFriendlyName(email.getEmailAddress());
}
}
while performing REM FL command, it simply judges whether the id is null, but it might be the value of email address, so I fix it like this:
//in SimpleMessenger.java
private void removeFriend(MsnList list, Email email, String id,
String groupId){
if (list==null||list==MsnList.RL)
return;
if (list==MsnList.FL){
// here is the differrence
if (id==null||id.equals(email.getEmailAddress()))
return;
}
else if (email==null)
return;
MsnContact contact = getContactList().getContactByEmail(email);
if (!contact.isInList(list)){
return;
}
OutgoingREM message = new OutgoingREM(getActualMsnProtocol());
message.setRemoveFromList(list);
if (list==MsnList.FL){
message.setId(id);
if (groupId!=null)
message.setGroupId(groupId);
}
else{
message.setEmail(email);
}
send(message);
}