as the local username is only available after binding (and legacy
session establishment). This makes Smack compatible again with XMPP
services that use the user's JID as from attribute in the result IQ
after the bind set IQ, e.g. Facebook:
SENT:
<iq id='sqvTK-1' type='set'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>Smack</resource>
</bind>
</iq>
RCV:
<iq from='user.name.1@chat.facebook.com' id='sqvTK-1' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>user.name.1@chat.facebook.com/Smack</jid>
</bind>
</iq>
Fixes SMACK-590
Similar flaw was also fixed in 2c7f1efe80.
Also ensure that OfflineMessagesManager doesn't leak collector by using
a try/finally block.
Fixes SMACK-592
This commit marks an important milestone with the addition of the
smack-android subproject. Smack is now able to run native on Android
without requiring any modifications, which makes the aSmack build
environment obsolete.
It was necessary to redesign the code for SASL authentication to achieve
this. Smack now comes with smack-sasl-provided for SASL implementations
that do not rely on additional APIs like javax for platforms where those
APIs are not available like Android.
It's a common pattern to look for all services hosted under the users
service that provide a given feature. Let's provide an API for that and
use that API in the methods that benefit from it.
Adopt to common design patterns in Smack:
- getFrom(Packet) in Packetextensions
- INSTANCES.put() in getInstanceFor()
- ELEMENT instead of ELEMENT_NAME
- Use XmlStringBuilder
Removes a ton of duplicate code, mostly related to MUCItem being
duplicated in MUCOwner and MUCAdmin, but also some other duplicate code.
Make MUC code use XmlStringBuilder.
Add ELEMENT and NAMESPACE constants to the appropriate places. Also add
"static <MUCPacketExtension> getFrom(Packet)" methods.
Make some MUC classes implement Element.
this was previously erroneously changed with
197548b548 from 'forbidden' to
'not-acceptable'. We now change it back to 'forbidden'.
Also delete FileTransferNegotiator.rejectStream(StreamInitation) because
it is dead code and add some comments and javadoc.
This also marks the starting point for extending the PubSub API to allow
additional packet extensions to be added to the request. This is for
example useful if one wants to limit the result with "Result Set
Management (XEP-59)".
Fixes SMACK-580.