On Fri Mar  7 13:31:45 2008, shashi kiran wrote:
i Block a Contact, and it is Successfully done,but once i unblock the same Contact in the current session my immediate Presence is not broadcasted to the contact but his presence is seen by me. Once i Logout and then login
again everything is fine he is able to see my presence and me his...


One problem is that you're not actually blocking and unblocking.


I Use the Following Stanzas for Block and Unblock

For Block:
     * <presence to='[EMAIL PROTECTED]'   type='unsubscribe'/>

This one is unsubscribing - you're no longer trying to get them to send you their presence.


      <presence to='[EMAIL PROTECTED]'  type='unavailable'/>*


This one, on the other hand, is a directed presence - you're saying "Tell these people I'm unavailable for the rest of this session, unless I say otherwise."


For Unblock:
      *<presence to='[EMAIL PROTECTED]'   type='subscribe'/>*


This one requests that the other person gives you permission to see his presence again.

But you never override the directed presence again, which lasts for the rest of the session. That's why everything works again once you log out and back in again.

For blocking, you either want to use privacy lists, or else you want to send out directed presence to the people you want to block - but note that doesn't actually block them, just make you appear offline.

Dave.
--
Dave Cridland - mailto:[EMAIL PROTECTED] - xmpp:[EMAIL PROTECTED]
 - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
 - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

Reply via email to