Like the title says… Is it required?
I know most servers automatically send it when they detect client disconnection.
So the question would be: Is it a good practice to send presence type=”unavailable” when disconnecting from xmpp server?
Like the title says… Is it required? I know most servers automatically send it
Share
It’s not required, but it is considered good practice, since in theory, you can send interesting information when you go unavailable, like how long you expect to be gone. In practice, it almost never makes a difference.
Keep in mind that a conformant server will send your unavailable presence (whether automatically, or when you ask it to by sending type=’unavailable’), it will go to all of your subscribers (subscription=’both’ or ‘from’), as well as every JID you have directed presence to. This is crucial to ensure that you get dropped out of all of the chat rooms you have joined (by sending them presence), for example.