1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Improve Roster API

Make Roster entries Map from BareJid to RosterEntry, since only
bare JIDs are allowed as roster items as per RFC 6121 § 3.1.1

   When a user sends a presence subscription request to a potential
   instant messaging and presence contact, the value of the 'to'
   attribute MUST be a bare JID <contact@domainpart> rather than a full
   JID <contact@domainpart/resourcepart>,…

Also some further Roster API changes regarding JIDs.
This commit is contained in:
Florian Schmaus 2015-05-27 22:34:43 +02:00
parent c125a3b055
commit 1d1ea5dd10
11 changed files with 109 additions and 84 deletions

View file

@ -87,7 +87,7 @@ public class RosterExchange implements ExtensionElement {
groupNames = groupNamesList.toArray(new String[groupNamesList.size()]);
// Create a new Entry based on the rosterEntry and add it to the packet
RemoteRosterEntry remoteRosterEntry = new RemoteRosterEntry(rosterEntry.getUser(),
RemoteRosterEntry remoteRosterEntry = new RemoteRosterEntry(rosterEntry.getJid(),
rosterEntry.getName(), groupNames);
addRosterEntry(remoteRosterEntry);