Commit Graph

82 Commits

Author SHA1 Message Date
Florian Schmaus 81002c4fbd Merge branch '4.2' 2017-11-22 08:37:47 +01:00
Florian Schmaus 9e11b68144 Add comment style checkstyle rule requiring a space 2017-11-20 08:53:19 +01:00
Florian Schmaus 0da3ebf385 Make MUC invitation rejected filter also filter by room address
Fixes SMACK-783.
2017-11-12 12:20:08 +01:00
Florian Schmaus 5ef6853db6 Improve MultiUserChat's leave() and destroy() login
Remove the "if (!joined) return" guard in leave() this allows to
resync the instances state with the real world state in case they ever
get out of sync.

Also call userHasLeft() in even if leave() throws and in certain
situations if destroy() throws.

Thanks to Дамян Минков and Ingo Bauersachs for pointing this out.
2017-11-07 20:38:19 +01:00
Florian Schmaus 0a4cd79d4e Call MultiUserChat.userHasLeft() before invoking listeners
in case a listener throws, userHasLeft() will eventually have set the
MutliUserChat instance to the right state.
2017-11-07 20:34:43 +01:00
Florian Schmaus d93d214f0e Remove duplicate code in MultiUserChat 2017-11-07 20:34:43 +01:00
damencho 44e4607259 Fix memory leak in MutliUserChat.removeConnectionCallback().
Fix memory leak by removing subject listener
in MutliUserChat.removeConnectionCallback().
Fixes SMACK-782.
2017-11-07 20:34:43 +01:00
Florian Schmaus 80eaaf2d71 Fix warnings 2017-08-16 14:10:00 +02:00
Ingo Bauersachs c9b9558cd4 Make add/remove for presence interceptors consistent 2017-08-01 16:17:35 +02:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus 8466a5af1a Improve MUCs subject changed notification filter
Filter also messages with bodies or thread element.
2017-04-04 14:27:11 +02:00
Florian Schmaus a887cde1ce Allow MUC room subject changes from the MUCs bare JID
Fixes SMACK-754.
2017-04-04 14:08:19 +02:00
Florian Schmaus 68cecf2eee Fix the MUC join presence response filter
Error responses do not contain the '110' status. Therefore we have to
filter for them via the stanza id and the from address.
2017-02-20 14:22:19 +01:00
Florian Schmaus 4c646436a5 Bump "Error Prone" to 2.0.15
and fix a few things :)
2017-02-11 16:16:41 +01:00
Florian Schmaus 5d0dd49e61 Introduce ToMatchesFilter
and refactor the FromMatchesFilter into AbstractFromToMatchesFilter.
2017-01-29 11:08:16 +01:00
Florian Schmaus 965cbcc979 Fix memory leak in MultiUserChat.enter(MucEnterConfiguration)
Thanks to Aleksander Melnichnikov for reporting this issue.

Fixes SMACK-745
2017-01-20 08:56:37 +01:00
Florian Schmaus 7c46f58c80 Rename "PacketReplyTimeout" → "ReplyTimeout" 2017-01-12 20:57:19 +01:00
Florian Schmaus d47463a533 Deprecate Chat API, introduce new Chat API
Also add (From|To)TypeFilter and update/fix the documentation in a few places.
2017-01-11 19:48:22 +01:00
Florian Schmaus 90a5e289f8 s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/ 2017-01-03 11:35:04 +01:00
Florian Schmaus 54790cd380 Filter MUC 'decline' messages by type 'normal'
and not by '!error' as this there are presence stanzas containing the
muc#user namespace also send to the client, which results in a
ClassCastException in the StanzaListener.
2016-11-14 08:50:46 +01:00
Anno van Vliet 47a4856cae Filter Errors on Change subject listener.
A unauthorized user sents a update room subject message which is
rejected by the server. It responds with an error message which
is not picked up by the ChangeSubjectListener.
2016-08-31 22:30:42 +02:00
Florian Schmaus d37d26547c Improve MUC code and documentation
- use JID types
- make clases immutable
2016-08-03 19:12:57 +02:00
Florian Schmaus f0f655c779 Javadoc fixes in MultiUserChat 2015-09-28 11:16:02 +02:00
Florian Schmaus 04a0004035 Smack 4.1.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJV9nAlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41sFEIAJlfRspk6S5ymNc4w7u/FT1w
 MpHT/cxqIQIBU9J5dYqeW6Y8O6VuUeknCmZBEv7dIVHroTmvfosMauAyRZJXWeeL
 FQQTBqDJszYdM88x/d5X6d25lCEBdQkdDh2a5s9AIy9RH0iXE74AypuikbroK+VC
 zI3wRPUFq7WnARtmiP2NalSgSNv5ToeicBO+JSniQ+O52ZAlP2FSDfi4uzPPigdP
 Ip/V3eF4Bp0YZimcxAnWdnMU+ciVLClRYKgD3+qTEoic7dx3dzeTyrk1NoLRgQl9
 mfcNXBgUScHZAoSIkR0QiUx9ktPCJ950qa+XtW3B8NtDOZkXegUL/a8ukQAuz+k=
 =qMsC
 -----END PGP SIGNATURE-----

Merge tag '4.1.4'

Smack 4.1.4
2015-09-14 09:05:24 +02:00
Florian Schmaus 6b7f69b42f Fix MUCs UserStatusListener
use oldPresence instead of packet. This bug was introduced with
e6aa2416e4.

Fixes SMACK-693.
2015-08-17 18:20:35 +02:00
Florian Schmaus ef8fa1fa46 Fix MUCRole and MUCAffiliation equal checks in MultiUserChat 2015-08-17 12:52:38 +02:00
Florian Schmaus d711caee38 Use EntityFullJid in MUC's getOccupant(Presence) API
instead of String, which will always return null if used with
ocupantsMap.get(String), because String.equals(Object) is only true if
Object is also instanceof String.

Thanks to Adnan Elezovic for reporting.
2015-08-12 10:22:11 +02:00
Florian Schmaus 24365f0f1e Fix MultiUserChat javadoc 2015-07-15 22:37:49 +02:00
Florian Schmaus ea00caca31 Fix MultiUserChat.enter() 'nickname' check
It's no longer necessary to check if 'nickname' is set. The
MucEnterConfiguration API already enforces that.
2015-07-15 22:36:10 +02:00
Florian Schmaus 57cc3aa3f8 Add MucEnterConfiguration API
Allows to configure the presence used when joining a MUC.

Part of SMACK-648: Improve the MUC API.
2015-07-07 08:52:33 +02:00
Florian Schmaus c125a3b055 Bump jxmpp to 0.5.0-alpha4 2015-05-27 19:29:51 +02:00
Florian Schmaus ff72ea320c Check if MUC room is hosted on a MUC service
when trying to enter a room.
2015-05-12 11:54:54 +02:00
Florian Schmaus fcc62ad131 Add support for MUC roomnick rewrite
SMACK-646
2015-04-23 23:11:40 +02:00
Florian Schmaus 5af4f1a5d1 Synchronize MultiUserchat.changeNickname(Resourcepart) 2015-04-23 21:45:33 +02:00
Florian Schmaus f274581c27 Add MucBookmarkAutojoinManager
Also add MucConfigFormManager and improve the MUC API (SMACK-648). Bump
to jxmpp 0.5.0-alpha3.

Improve and extend PrivateDataManager and BookmarkManager.
2015-04-21 19:31:10 +02:00
Florian Schmaus 83b84c5bd3 Merge branch '4.1'
Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java
	smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java
	smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
	version.gradle
2015-03-24 17:16:18 +01:00
Florian Schmaus 5e86db4f80 Substitute 'packet' with 'stanza(/packet)' in javadoc 2015-03-21 09:36:28 +01:00
meisterfuu 05c97c494b Add roomDestroyed callback to MUC UserStatusListener
Fixes SMACK-619
2015-03-17 09:51:20 +01:00
Florian Schmaus 516e397679 Improve MUC's Destroy element class
- Made jid of type BareJid
- Made it implement TypedCloneable
- Made it implement Serializable
- Made it immutable

Also update its parsing code. And add some convenience methods to
ParserUtils.
2015-03-11 21:31:37 +01:00
Florian Schmaus c540ac9703 Merge Smack 4.1.0-rc3
Conflicts:
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/provider/BytestreamsProvider.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
	version.gradle
2015-03-07 21:31:56 +01:00
Florian Schmaus 48aae12ba3 Remove XMPPException from MultiUserChat.sendMessage
as it's not actually thrown.
2015-03-07 20:52:44 +01:00
Florian Schmaus 701aa7d9c4 Merge branch '4.1'
Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/PacketCollector.java
	smack-core/src/main/java/org/jivesoftware/smack/PacketListener.java
	smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/debugger/SmackDebugger.java
	smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java
	smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java
	smack-core/src/test/java/org/jivesoftware/smack/ThreadedDummyConnection.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/address/provider/MultipleAddressesProvider.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/DataListener.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FaultTolerantNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IBBTransferNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/Socks5TransferNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java
	smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java
	smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
	smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java
	smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/UserID.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java
	smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
	version.gradle
2015-03-04 22:42:36 +01:00
Florian Schmaus ed4fa3390f Add XMPPConnection.sendStanza(Stanza)
and deprecate sendPacket().
2015-03-04 21:46:44 +01:00
Florian Schmaus 85a9b07230 Fix MUC participantStatusListeners
Thanks to Anno van Vliet for reporting the issue and proposing the fix.
2015-03-03 17:11:42 +01:00
Florian Schmaus 75ec271c6c Rename PacketListener to StanzaListener
and add the PacketListener as deprecated interface.
2015-03-02 15:49:56 +01:00
Florian Schmaus d4a6d8e653 Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
Florian Schmaus 5bb4727c57 Use Jid (and subclasses) from jxmpp-jid
Fixes SMACK-634
2015-02-17 16:07:16 +01:00
Florian Schmaus bc61527bd2 Expose InterruptedException
SMACK-632
2015-02-14 14:57:33 +01:00
Florian Schmaus 4698805a34 Rename 'Packet' class to 'Stanza'
Smack still uses the term 'Packet' in some places. This is just the
first step towards using correct XMPP terms in Smack.
2015-02-06 09:34:51 +01:00
Florian Schmaus 86ea027301 Add StringUtils.requireNotNullOrEmpty and Objects.requireNonNull
and use this in a few places.
2015-01-26 20:47:09 +01:00