Menu

#5 403 error of REM FL command

open
nobody
Internals (9)
5
2006-12-08
2006-12-08
No

//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);
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.