Cancel Subscription Request

This is a bit of a protocol question, but might turn into a Wildfire question. Is there a way to cancel an outgoing subscription request?

For example, if user1 requests a subscription to user2, is there a way for user1 to cancel that request? I would assume that user1 could send a presence packet of type ‘‘unsubscribed’’ to user2 to accomplish this. Then the ask attribute would be removed from the item in user1’'s roster and user2 would not receive a presence packet of type ‘‘subscribe’’ the next time they login? The RFC seems to not address this use case specifically.

  • Danny

Hey Danny,

Usually user1 will remove user2 from his roster so an iq:roster packet is sent to the server to remove user2 from the roster. The server in turn will send an “unsubscribe” presence to user2. The final result is that user2 will no longer have to answer the presence subscription request and user1 will no longer have user2 in his roster.

Hope that helps.

Regards,

– Gato

Sounds good. I was hoping that there would be an inbetween state where I could still leave the user in my roster, but I guess the protocol doesn’'t support that.

Thanks!

  • Danny

Hey Danny,

You can also send an “unsubscribe” presence to the other user. In this case, the user will stay in your roster with subscription NONE and the other user will not have you in his roster or any subscription request should be void.

Regards,

– Gato