How do resources work?

Hi, everyone,

How do resources work? If I try to send a message to someuser@someserver/resourceA and the user is signed on at someuser@someserver/resourceB, will he always/sometimes/never receive it? If I check the presence of someuser@someserver/resourceA, will it always/sometimes/never detect someuser@someserver/resourceB? (Sometimes meaning server-/client-/configuration-dependent.)

thanks!

The resource with the highest priority will get the message. If they are the same priority, the result is undefined.

Both resource presences will be sent to your client when you sign on.

Thanks!

How is priority determined? Also, suppose resources A and B are online, and B has a higher priority, and I send a message to A: which recieves the message? And does checking presence for different resources work the same way?

The client sets the priority. If you send a message to resource A, resource A will get it. If you don’'t specify the resource, the highest priority will get it.

You don’‘t check for presence, it’'s sent to you - either when you sign on or when someone in your roster signs on.

1 Like

Thanks, that’'s helpful.