[jdev] Re: Adding a contact to msn from jabber.

Bruno Bechler Machado brunoasdfgh at gmail.com
Wed Mar 7 06:28:10 CST 2007


thanks for helping guys!
i solved the problem, if anyone needs it, here is a code example:

   public void addContact()
   {
       Roster roster = connection.getRoster();

       Presence subscribe = new Presence(Presence.Type.SUBSCRIBE);
       subscribe.setTo("myfriend\\40hotmail.com at msn.myServer.org");
       subscribe.setFrom(connection.getUser());
       connection.sendPacket(subscribe);
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20070307/c495060f/attachment-0002.htm>


More information about the JDev mailing list