OK so now I'm getting notifications but I have another problem (which may be entirely mine).
I can remove groups ok but removing contacts is doing something strange. I can call the removeFriend() API but a subsequent call to getContacts() still shows the contact in the contact list. It isn't until I restart that I see the change. Is there some sort of reset I need to do after removing a contact.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Howdy, no, you shouldn't have to do a reset. In net.sf.jml.protocol.incoming.IncomingREM, line 118, you still see what is -supposed- to be taking care of that. I'd be interested in hearing if using: getContactsInList(MsnList.FL) would take care of the issue. Of course this would eliminate some code on your end too where you are checking for existence in the FL. My theory is that the contact is still in one of your lists. (there are four, reverse list, forward list, allow list, and block list)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This just gets more interesting. The code never gets to line 118 because the list id is 2 not 0. Furthermore after adding a user in my program, if I then log into the real MSN IM tool I don't see that user.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
List id of 2 is not necessarily wrong. =) It means that the person is still in your block list. (many 'removals' also block, including JML unless you specify block as false when using removeContact)
As for adding the user and them not showing up in a real MSN IM client, that's odd... =( I use that functionality extensively in a project I'm working on and it seems to work. I don't suppose you'd be interested in pasting the code fragment where you are adding a user would you?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you enable the debug logging, what do you see going out and coming back? Offhand I don't see anything wrong with what you are doing.
Groups are.. sorta a pain, since if you are creating a new group you have to wait until you receive the confirmation that the group was added so you can get an id number and such. =/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK so now I'm getting notifications but I have another problem (which may be entirely mine).
I can remove groups ok but removing contacts is doing something strange. I can call the removeFriend() API but a subsequent call to getContacts() still shows the contact in the contact list. It isn't until I restart that I see the change. Is there some sort of reset I need to do after removing a contact.
Howdy, no, you shouldn't have to do a reset. In net.sf.jml.protocol.incoming.IncomingREM, line 118, you still see what is -supposed- to be taking care of that. I'd be interested in hearing if using: getContactsInList(MsnList.FL) would take care of the issue. Of course this would eliminate some code on your end too where you are checking for existence in the FL. My theory is that the contact is still in one of your lists. (there are four, reverse list, forward list, allow list, and block list)
This just gets more interesting. The code never gets to line 118 because the list id is 2 not 0. Furthermore after adding a user in my program, if I then log into the real MSN IM tool I don't see that user.
List id of 2 is not necessarily wrong. =) It means that the person is still in your block list. (many 'removals' also block, including JML unless you specify block as false when using removeContact)
As for adding the user and them not showing up in a real MSN IM client, that's odd... =( I use that functionality extensively in a project I'm working on and it seems to work. I don't suppose you'd be interested in pasting the code fragment where you are adding a user would you?
Here is the code I'm using to add/remove users:
public void addUser( String group, String userName ) {
Email email = Email.parseStr( userName );
messenger.addFriend( email, userName );
}
public void deleteUser( MsnContact user ) {
Email email = user.getEmail();
messenger.removeFriend(email, false );
}
Notice that add accepts a group name. I'm not sure how to add to a specific group - that's my next headache :-)
If you enable the debug logging, what do you see going out and coming back? Offhand I don't see anything wrong with what you are doing.
Groups are.. sorta a pain, since if you are creating a new group you have to wait until you receive the confirmation that the group was added so you can get an id number and such. =/
Here is the log when addUser() is called:
Nov 24, 2006 4:45:46 PM net.sf.jml.protocol.MsnSession$1 messageSent
INFO: s_gutz@yahoo.com NS >>> ADC 7 FL N=s_gutz@yahoo.com F=s_gutz@yahoo.com
Nov 24, 2006 4:45:46 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< ADC 7 FL N=s_gutz@yahoo.com F=s_gutz@yahoo.com C=c8558c8e-5d7f-41c6-945d-151318d09926
Nov 24, 2006 4:45:47 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< ILN 7 NLN s_gutz@yahoo.com s_gutz@yahoo.com 1342472236
Nov 24, 2006 4:45:47 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< UBX s_gutz@yahoo.com 0
====================
Chunk Debug
====================
====================
Binary Chunk Debug
====================
Nov 24, 2006 4:45:47 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< ADC 0 RL N=s_gutz@yahoo.com F=s_gutz@yahoo.com 1
Nov 24, 2006 4:45:51 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< CHL 0 17118156411979628491
Nov 24, 2006 4:45:51 PM net.sf.jml.protocol.MsnSession$1 messageSent
INFO: s_gutz@yahoo.com NS >>> QRY 8 PROD0090YUAUV{2B 32
====================
Chunk Debug
====================
40a46a2788992d8786874b83174379d0
====================
Binary Chunk Debug
====================
00000000h: 34 30 61 34 36 61 32 37 38 38 39 39 32 64 38 37 ; 40a46a2788992d87
00000010h: 38 36 38 37 34 62 38 33 31 37 34 33 37 39 64 30 ; 86874b83174379d0
Nov 24, 2006 4:45:51 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< QRY 8
Here is the log when deleteUser() is called:
Nov 24, 2006 4:46:33 PM net.sf.jml.protocol.MsnSession$1 messageSent
INFO: s_gutz@yahoo.com NS >>> REM 9 FL c8558c8e-5d7f-41c6-945d-151318d09926
Nov 24, 2006 4:46:33 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< REM 9 FL c8558c8e-5d7f-41c6-945d-151318d09926
Nov 24, 2006 4:46:39 PM net.sf.jml.protocol.MsnSession$1 messageReceived
INFO: s_gutz@yahoo.com NS <<< REM 0 RL s_gutz@yahoo.com
Hrm. I also don't see anything wrong with any of those conversations. *scratch head*