Hi
When an contact added me while I am offline, the contact is added to PL but not to RL.
http://msnpiki.msnfanatic.com/index.php/MSNP11:Changes
To 'solve' this problem, we must manually add them to the RL (yes, that's possible now, but presumably only if they're on the PL) and remove them from the PL. The official client (V7 and above) handles it as follows:
> LST N=their@email.address F=Display%20Name C=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 19\r\n
< ADC 31 RL N=their@email.address\r\n
> ADC 31 RL N=their@email.address\r\n
< REM 37 PL their@email.address\r\n
> REM 37 PL their@email.address\r\n
To be able mimic this effect (in addFriend) I created the following patch.
It might be suboptimal, as it requires addFriend to be called, but is enough for me right now. Maybe someone will adapt it.
Right now, It is better than nothing.
Regards,
Steffen
--- L:/Projekte/osiris4/dev/JML/src/net/sf/jml/protocol/outgoing/OutgoingADC.java (revision 81)
+++ L:/Projekte/osiris4/dev/JML/src/net/sf/jml/protocol/outgoing/OutgoingADC.java (working copy)
@@ -47,9 +47,9 @@
if (list == null) {
throw new NullPointerException();
}
- if (list == MsnList.RL) {
- throw new IllegalArgumentException(list.toString());
- }
+// if (list == MsnList.RL) {
+// throw new IllegalArgumentException(list.toString());
+// }
setParam(0, list.getListName());
}
--- L:/Projekte/osiris4/dev/JML/src/net/sf/jml/impl/SimpleMessenger.java (revision 81)
+++ L:/Projekte/osiris4/dev/JML/src/net/sf/jml/impl/SimpleMessenger.java (working copy)
@@ -67,7 +67,7 @@
}
private void addFriend(MsnList list, Email email, String friendlyName) {
- if (list == null || email == null || list == MsnList.RL
+ if (list == null || email == null // || list == MsnList.RL
|| list == MsnList.PL)
return;
MsnContact contact = getContactList().getContactByEmail(email);
@@ -127,6 +127,10 @@
friendlyName = email.getEmailAddress();
MsnContact contact = getContactList().getContactByEmail(email);
if (contact != null) {
+ if (contact.isInList(MsnList.PL)) {
+ addFriend(MsnList.RL, email, null);
+ removeFriend(MsnList.PL, email, null, null);
+ }
if (!contact.isInList(MsnList.FL)) {
addFriend(MsnList.FL, email, friendlyName);
}
Logged In: YES
user_id=10039
Originator: NO
*laugh* Good job MSN! Thanks again for the patch! I might take what you've learned/done and alter it slightly, or implement exactly what youv'e done. Not sure yet!