If you attach a object to the switchboard the following happens. If the switchboard is initiated by the msn client (Not my 3rd party version but the real thing) everything works fine, msg is sent and received by both of them. If the switchboard is initiated by JML with a attachment to the switchboard, no message will reach the receiving end. I have notice when this happens the switchboard has no contacts attached to it.
Just want to say thanks for the great lib, it is saving me loads of effort.
Thanks,
Phil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 3 stars i think is the problem. If the switchboard has a attachment the invite will not be sent to the contact. The same if the contact joins the switchboard the attachment will be set to null!!! Dont really know why this is needed the cheack : switchboard.getAttachment() == attachment.
Hope this helps.
Phil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
If you attach a object to the switchboard the following happens. If the switchboard is initiated by the msn client (Not my 3rd party version but the real thing) everything works fine, msg is sent and received by both of them. If the switchboard is initiated by JML with a attachment to the switchboard, no message will reach the receiving end. I have notice when this happens the switchboard has no contacts attached to it.
Just want to say thanks for the great lib, it is saving me loads of effort.
Thanks,
Phil
I think i found the problem. In BasicMessenger.java, the 'public void sendText(final Email email, final String text)' function looks like this.
final Object attachment = new Object();
addSwitchboardListener(new MsnSwitchboardAdapter() {
public void switchboardStarted(MsnSwitchboard switchboard) {
* if (switchboard.getAttachment() == attachment) {
switchboard.inviteContact(email);
}
}
public void contactJoinSwitchboard(MsnSwitchboard switchboard,
MsnContact contact) {
* if (switchboard.getAttachment() == attachment
* && email.equals(contact.getEmail())) {
* switchboard.setAttachment(null);
removeSwitchboardListener(this);
switchboard.sendText(text);
}
}
});
newSwitchboard(attachment);
The 3 stars i think is the problem. If the switchboard has a attachment the invite will not be sent to the contact. The same if the contact joins the switchboard the attachment will be set to null!!! Dont really know why this is needed the cheack : switchboard.getAttachment() == attachment.
Hope this helps.
Phil