This adds supports for an experimental protocol flow where a pending
friend request's decission is later on deliverd to the requestor after
the owner made its decission.
allow multiple of them to be installed, instead of at most one. Fixes
deadlock in LowLevelRosterIntegration test because
IoTProvisioningManager's SubscribeListener would not come up with a
decission.
Smack's previous entity caps implementation assumed that an entity lost
its entity caps feature as soon as a presence without caps from that
entity was received. But according to XEP-0115 § 8.4, this is a
perfectly normal optimization technique. We now reset the caps state
after an available presence becomes unavailable.
Also introduce PresenceEventListener, which is required for this
feature.
Also make Roster.preApprove() take a BareJid as argument.
Fixes SMACK-723.
As otherwise the Roster would be still unitialized after a SM resumption
if the connection was uncleanly terminated.
Thanks to Grigory Fedorov for reporting this.
The previously used approach of
project(':smack-core').sourceSets.test.runtimeClasspath
caused the 'eclipse' target to produce duplicate classpath entries in
.classpath when run with Gradle >= 2.6. It also relied on Gradle
internals.
Instead we now use
project(path: ":smack-core", configuration: "testRuntime")
project(path: ":smack-core", configuration: "archives")
to be able to use test classes from other subprojects (usually
smack-core) in e.g. smack-extensions. The 'archives' configuration
includes the test jar.
See also https://discuss.gradle.org/t/11784
Thanks to Lari Hotari for helping with this issue.
bareJidChats is a ConcurrentHashMap which does not allow 'null' keys,
thus get(null) returns a NPE. And asEntityBareJidIfPossible may return
'null', this could happen.
This can happen for example if the store schema changes across Smack
version.
Previously Smack would simply ignore the entry, which would lead to an
inconsistent view of the Roster.
remove (set|get)ItemStatus. This was always the ask status, which can
only be set to 'subscribe' or is non-existent.
Use the standard (de-)serialization facilities for DirectoryRosterStore.
Fixes Smack-657.
And replace all instances where String.Builder.append() is called with a
String of length one with append(char).
Also adds StringUtils.toStringBuilder(Collection, String).
if the connection is not connected in sendStanzaWithResponseCallback and
in PacketCollector.
Also decrease log level if roster result listener's exeption callback is
invoked with a NotConnectedException.
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.