Alex's answer is correct, but let me tell you more about him:
XMPP-IM . JID 'from' 'both' (RFC6121 XMPP-IM 4.2.2 4.4.2).
4.4.2 :
The user server MUST also send the presence stanza to all of the user
available resources (including the resource that generated the presence
notification in the first place).
, JID. JID, , , ( ,...) JID, " ".
, , XMPP, , JID, XMPP-IM.
smack Iterator<Presence> Roster.getPresences(String user). : getPresences(XMPPConnection.getUser()). ( , , ).