Steffen Heil - 2007-12-15

Hi

I have a system where a lot of clients will occassionally add the systems account to their messenger and then somewhen remove it again.
This will happen frequently but there will never be many users who have the system on their list.

Now I want to do the following:

Whenever a user adds the system to it's contact list, "contactAddedMe" is called and I call
  messenger.addFriend( contact.getEmail(), null );
Thus the system accepts any contact.

Whenever a users removes the system from it's contact list, "contactRemovedMe" is call and I call
  messenger.removeFriend( contact.getEmail(), false );
Thus the system drops that contact.

However the contact stays on AL, which means it is sent on the contact list, whenever the system logs on.
I added the following code:

    public void defaultBlockFried(Email email) {
      removeFriend(MsnList.BL, email, null, null);
      removeFriend(MsnList.AL, email, null, null);
    }

Which is a mix of blockFriend and unblockFriend, which basically removes the user from both Lists, thus restoring the undecided state of a new contact. Calling removeFriend afterwards removes the contact completely.

Could this be added (maybe with another name) to the API?
Or is there another way to delete a contact completely?

Regards,
  Steffen