1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-10-31 17:25:58 +01:00
Commit graph

508 commits

Author SHA1 Message Date
Florian Schmaus
ba323b51f9 Remove API parts scheduled to be removed in Smack 4.3 2017-08-16 14:31:46 +02:00
Florian Schmaus
80eaaf2d71 Fix warnings 2017-08-16 14:10:00 +02:00
Florian Schmaus
43abd52d76 Smack 4.2.1
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlmR75tfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFLeXggAjdgj7YVUe22NtamnROBj1c3PaWwgSY0gEjcyDPsOz5qeqNUdQLHbmt2j
 XQQpYZWKg1/1uoQHlsixaFKbGVctKRk72aNEodRfd1osta11WTOwZKEb8nI411Tt
 7M0Fhf430WZY6nioZiZIorsmid57fftJ2EMPlmjEDp2FD0AVGAXkEhCneGaPtt9Q
 hbWbepIy9tApeIH+QgmFLBmPLnFCaSg+X6NUden3Z21bUz5vH8pmcbeUVfsNB7kW
 nkkDuNwKHPFLgjuhcq7D+KAKRwNU7n8WEuHseRzM7bMCEB+S/rZok5KPXe/tV4v+
 YZKN2e+2yh4j5l4FT/fCzELfWcvrgA==
 =MV3G
 -----END PGP SIGNATURE-----

Merge tag '4.2.1'

Smack 4.2.1
2017-08-14 21:01:36 +02:00
Florian Schmaus
772e45da92 Introduce NotAPubSubNodeException
Fixes SMACK-759.
2017-08-14 20:23:35 +02:00
Florian Schmaus
f4391c07d7 Rework SmackFuture and add async API based on it 2017-08-12 17:35:45 +02:00
Florian Schmaus
0602ae064a Remove deprecated methods from XMPPConnection 2017-08-12 13:36:47 +02:00
Thomas
b70e80b1ad Keep 4.1.9 chat.sendMessage(String) behavior
chat2.Chat.send(String) should have the same behavior as chat.Chat.sendMessage(String)
2017-08-11 10:30:05 +02:00
Florian Schmaus
7f851d806c Use StandardExtensionElement in JingleProvider
and some further minor jingle fixes:
- deprecate getJingleTransport() in favor of getTransport()
- Jingle.Builder now checks if the session ID is not empty
2017-08-05 11:13:58 +02:00
Ingo Bauersachs
c9b9558cd4 Make add/remove for presence interceptors consistent 2017-08-01 16:17:35 +02:00
Florian Schmaus
ed9eae4793 Improve JingleS5BTransportInfo by introducing abstract class
Introduce a abstract class for shared functionality. And remove static
lazy getters.
2017-07-30 19:29:11 +02:00
Ingo Bauersachs
0b8788a9fc Fix parameter ordering in BoBHash construction 2017-07-20 22:50:34 +02:00
Florian Schmaus
104146c5ed Add Jingle.getSoleContentOrThrow() 2017-07-17 21:05:56 +02:00
Florian Schmaus
8f808b38e1 Merge pull request #153 from vanitasvitae/fixReason
Allow parsing of JingleReason.AlternativeSession
2017-07-08 08:24:17 +02:00
58c32639b5
Allow parsing of JingleReason.AlternativeSession
The JingleReasonProvider was faulty and ignored the
<alternative-session> element.
2017-07-06 16:55:12 +02:00
8bd3856fa1
Fix typos in filetransfer package 2017-07-06 14:01:28 +02:00
7e76bc1ae5
More changes to the Jingle package:
- Change visibility of some Socks5Bytestreams code.
- Add central ThreadPool
- Move FullJidAndSessionId in own class
- More complete JingleSession class
- More complete JingleUtil class
- Improved tests
2017-07-03 10:35:46 +02:00
5bd01b7385
Add Jingle File Transfer elements and JingleUtil class 2017-06-30 15:03:13 +02:00
Florian Schmaus
541c9ecfdd Fix compile errors in jingle code
Which where introduced by merging

20eabca1b3

after

b14aca744f
2017-06-29 18:09:25 +02:00
Florian Schmaus
1d53889874 Merge pull request #145 from vanitasvitae/singleJingleTransport
Switch to single transport instead of list
2017-06-28 21:02:52 +02:00
20eabca1b3
Also replace list with single transport-info info 2017-06-26 15:04:22 +02:00
e2b8ffdf22
Switch to single transport instead of list 2017-06-21 13:42:02 +02:00
b14aca744f
Add Jingle SOCKS5Bytestream transport method 2017-06-19 10:11:08 +02:00
Florian Schmaus
2b11074950 Merge branch '4.2' 2017-06-17 15:55:38 +02:00
Florian Schmaus
05148ab0ad Merge pull request #142 from vanitasvitae/jingleIBB
Add Jingle InBandBytestream transports
2017-06-16 23:32:59 +02:00
Florian Schmaus
aaad697b02 Merge pull request #140 from vanitasvitae/TransportInfo
Add JingleContentTransportInfo class
2017-06-16 23:25:23 +02:00
Florian Schmaus
6712cc91c8 Merge pull request #139 from vanitasvitae/JingleErrors
Remove unused errors and add missing ones
2017-06-16 23:19:50 +02:00
5699373cd9
Add method to set Reason 2017-06-16 22:54:32 +02:00
287976e0e0
Add Jingle InBandBytestream transports 2017-06-16 22:43:50 +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
a604266336
Create alternative-session JingleReason 2017-06-14 00:00:27 +02:00
4ae8434852
Remove unused errors and add missing ones 2017-06-13 23:57:59 +02:00
d49dc71bae
Add JingleContentTransportInfo class 2017-06-08 15:04:25 +02:00
Florian Schmaus
349d1ba2ae Merge pull request #136 from vanitasvitae/jingleManagerFixes
Fix typos and xml issues in jingle package
2017-06-05 11:04:52 +02:00
23190604bd
Fix typos and xml issues 2017-06-04 20:41:27 +02:00
23ed0bdbce
Add missing security-info in JingleAction
Also fix typo
2017-06-03 23:23:23 +02:00
Florian Schmaus
6bb001d274 New Jingle API groundwork
A start for the new Jingle API. Since Jingle is a single IQ with many
plugable extensions, there are some particularities we need to deal
with, e.g. jingle users have to register with JingleManager.

This is untested code. There may be drangons.
2017-05-30 08:45:27 +02:00
Florian Schmaus
7a5f9e6a03 Merge branch '4.2' 2017-05-25 11:25:36 +02:00
Florian Schmaus
ce1cddc722 More checkstyle whitespace related checks 2017-05-24 14:42:38 +02:00
Alexander Tovstonozhenko
b636883ce6 Fix NPE in hashCode() in Occupant when jid is null
Fixes SMACK-764.
2017-05-19 14:09:19 +03:00
Florian Schmaus
5f900d3713 Add PingManager.pingAsync(Jid, long)
and SmackFuture API.
2017-05-16 15:53:03 +02:00
Florian Schmaus
5aab471d64 Improve handling of error response "Pongs" 2017-05-16 15:53:03 +02:00
Florian Schmaus
24f6d86452 Fix typo: s/ProsoydWorkaround/ProsodyWorkaround/ 2017-04-19 12:23:17 +02:00
Florian Schmaus
ddf888e607 Do not return null in getLeafNodeProsodyWorkaround
and rethrow the original exception.
2017-04-19 12:21:04 +02:00
Florian Schmaus
bfab3ec578 PubSubManager.getLeafNode(): Actually employ the prosody workaround 2017-04-19 11:50:01 +02:00
Florian Schmaus
e6a51f2151 Add PubSubManager.getLeafNode() and improve prosody workaround
by using the protected constructor and not reflection.
2017-04-19 11:46:39 +02:00
10927577ad
Fix getOrCreateLeafNode for prosody 2017-04-19 11:34:47 +02:00
Florian Schmaus
c636e72a9d Change behavior of send()/publish() in LeafNode
Previously publish() was "asynchronously" in that sense that the response
of the IQ as *not* awaited, and send() would wait for the
responses. It makes no sense to have that functionality this way.

Instead we now make publish() to the right thing, i.e., wait for an IQ
result, make send() a proxy for publish(), and mark send() deprecated.

In the future, there may be a publishAsync() method which returns a
Future instance.
2017-04-06 15:11:04 +02:00
Florian Schmaus
16ede9806a Add PubSubManaer.supportsAutomaticNodeCreation() 2017-04-06 12:32:34 +02:00
Florian Schmaus
e73cef8000 Add PubSubManager.tryToPublishAndPossibleAutoCreate(String, I) 2017-04-06 10:14:54 +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
08c228ef99 Merge branch '4.2' 2017-03-20 14:57:42 +01:00
Florian Schmaus
1e0481b355 Add PubSubManager.getOrCreateLeafNode(String) 2017-03-18 18:31:06 +01:00
Florian Schmaus
0a6843f41f Make StreamNegotiator weakly reference XMPPConnection
by extending Manager.

Because FileTransferNegotiator will hold a strong reference to the
StreamNegotiators, which will eventually prevent XMPPConnection from
being GC'ed if no weak references in StreamNegotiator are used.

Thanks to Werner Glanzer for pointing this out.
2017-03-15 21:17:49 +01:00
Florian Schmaus
a592a12229 Make InBandBytestreamManager use weak references to XMPPConnection 2017-03-15 15:07:41 +01:00
Florian Schmaus
1a93b448db Smack 4.2.0
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAljDKBtfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFJB7Qf6AlkwpzMqq1g18jzEBFVX/3Sk2QWivEY7t3EhGuSguan2VIfd1fL0P85Q
 vLBm6Pw93haIxHXKRUKc8DINwP9yuRMvUotCN2hYVgfqfByHGhDCJLTNZ9atncL5
 JToptfhdRy6kgljVZPtpXOMXKBvaO3QOuTuC5cmz8PlidsYw0yUnliPLQ36uPRWX
 eaEXXbgmkjJh35WjsaafD/uM86OCqZahfvEf3e8bkPzdAayd0OKU67+v0ArA9P2E
 CiRU5vfco/vt2Qo41aLLIEOjSFfVX6Xh/pXxfQvInMAxies0KRLi5vonOmfrWRmi
 uIblzcYRXCSaZSgVN2yF8KzmF4pzcw==
 =qETn
 -----END PGP SIGNATURE-----

Merge tag '4.2.0'

Smack 4.2.0
2017-03-10 23:35:06 +01:00
Florian Schmaus
c81f28a3a2 Update Error Prone to 2.0.18
and update errorprone-plugin to 0.0.9.
2017-03-07 11:00:47 +01: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
6cfdf2bc6f Use CopyOnWriteArraySet for pingFailedListeners
To prevent

java.util.ConcurrentModificationException
  at java.util.HashMap$HashIterator.nextEntry(HashMap.java:788)
  at java.util.HashMap$KeyIterator.next(HashMap.java:815)
  at org.jivesoftware.smackx.ping.PingManager.pingMyServer(PingManager.java:252)
  at org.kontalk.service.msgcenter.MessageCenterService$3.run(MessageCenterService.java:1114)
  at java.lang.Thread.run(Thread.java:818)

Thanks to Daniele Ricci for reporting this.
2017-02-15 20:16:40 +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
ef0af66b21 Enfore spaces for indentation
Although I'm in the tabs camp, Smack uses mostly spaces. Therefore it
is the logical choice for the indentation style.
2017-02-07 22:10:10 +01:00
Florian Schmaus
bf1e07e672 Fix chat2.ChatManager's message filter
Thanks to Andras Csete for pointing this out.
2017-02-02 12:46:50 +01:00
Florian Schmaus
187fe37cd7 Fix MucEnterConfiguration.Builder.withPresence(Presence) throw ISE
when presence is of type available. This inverts the logic to fix
this.
2017-01-30 17:09:29 +01:00
Florian Schmaus
5d0dd49e61 Introduce ToMatchesFilter
and refactor the FromMatchesFilter into AbstractFromToMatchesFilter.
2017-01-29 11:08:16 +01:00
Florian Schmaus
33371cffaf Move ChatStateExtension Provider in its own class 2017-01-23 22:59:53 +01:00
Florian Schmaus
af1bde4fd0 Make MUC invitations 'from' value an EntityJid
instead of an EntityFullJid, because according to XEP-0045 § 7.8.1.:

"The <room@service> itself MUST then add a 'from' address to the
<invite/> element whose value is the bare JID, full JID, or occupant
JID of the inviter …"
2017-01-20 17:06:06 +01:00
Florian Schmaus
4d7b9318ce Add callbacks for block/unblock events to BlockingCommandManager 2017-01-20 08:57:03 +01:00
Florian Schmaus
ff97d2eb35 Make BlockContactsIQProvider idiomatic
The jids list doesn't have to be lazy initialized, because every IQ of
that type is guaranteed to contain at least one JID.

Also use ParserUtils.getJidAttribute().
2017-01-20 08:56:56 +01:00
Florian Schmaus
b3662c0682 Make UnblockContactsIQ immutable
and make the serialization function idiomatic.
2017-01-20 08:56:50 +01:00
Florian Schmaus
07cba5b974 Make BlockContactsIQ immutable 2017-01-20 08:56:44 +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
b5415fe841 Don't wait the reply timeout in OfflineMessageManager.getMessages(List<String>)
for the last message. We now count the number of messages we want to
retrieve, and don't wait for another message if we have already
received all.

Thanks to King Jeong Hun for reporting this.
2017-01-12 13:40:55 +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
cff91f5a92 Use correct element and namepsace in AccountManager.isSupported() 2017-01-07 10:38:41 +01:00
Florian Schmaus
7167a55f81 AccountManager: Don't fallback to disco#info if not authenticated 2017-01-06 14:56:35 +01:00
Florian Schmaus
90a5e289f8 s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/ 2017-01-03 11:35:04 +01:00
Florian Schmaus
9328182912 Rework Bits of Binary implementation 2017-01-03 11:05:46 +01:00
Florian Schmaus
c688acaa0f Add XEP-0231: Bits of Binary implementation
Fixes SMACK-737
2017-01-03 11:00:05 +01:00
Fernando Ramirez
018a7dd93a Blocking Command: add blocked error management and refactor SMACK-731 2017-01-02 16:02:10 +01:00
Florian Schmaus
183c605278 Bump JXMPP to 0.5.0 2017-01-02 09:40:46 +01:00
Florian Schmaus
7655ac17f2 Re-activate EntityCaps integration test 2016-12-24 10:27:04 +01:00
Florian Schmaus
ecf1ed7f6b Fix EntityCapsManager presenceSend
capturing all outoing presences of type 'available' would also capture
presences not used for presence broadcast, e.g., MUC presences.

This caused the EntityCaps integration test (localEntityCaps) to fail
if the MUC integration test was run before.
2016-12-23 23:52:29 +01:00
Florian Schmaus
b558a128c3 Merge remote-tracking branch 'my/master' 2016-12-07 21:20:02 +01:00
Florian Schmaus
274e5630c4 Add support for XEP-0133: Service Administration
also extend Smack's integration test framework to use XEP-0133 as a
means for of throw away account creation.

Fixes SMACK-742
2016-12-04 21:42:50 +01:00
Florian Schmaus
d976434bb3 Improve message of XMPPErrorException
by including the XMPP entity which send the XMPP error reply to us.

Also cleanup the no longer used constructors.
2016-11-29 16:40:08 +01:00
Florian Schmaus
9165e818d9 Add ParenPad and NoWhitespaceAfter checkstyle rules 2016-11-29 12:01:41 +01:00
Florian Schmaus
d6ebb884e7 Ad-Hoc Commands: 'type' attribute is optional
Fixes SMACK-741
2016-11-23 17:55:16 +01:00
Florian Schmaus
1b1e88c4c3 Fix UOE being thrown in BlockingCommandManager
the manager must use a copy of the BlockListIQ's JID list, since it may
be the empty list which is not modifiable.

Also rename the getter methods from getJids() to getBlockedJids().
2016-11-23 17:52: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
Florian Schmaus
5bb0c8c223 Option to automatically rejoin MUC rooms after reconnection
Fixes SMACK-572.
2016-11-06 11:14:19 +01:00
Florian Schmaus
095b5c85a1 Also catch SmackException in Socks5BytestreamRequest
and use try/multi-catch.
2016-11-05 20:02:25 +01:00
Florian Schmaus
4f7324103c Throw instead of return in Socks5Client
Returning a boolean is not really expressive in such cases. For example,
if it returns 'false' then the callee has no information *what* went
wrong. Instead throw an SmackException with some more information.
2016-11-05 19:56:34 +01:00
Florian Schmaus
32b4e74910 Improve exception message of Socks5 code 2016-11-05 18:24:07 +01:00
Florian Schmaus
1f66f301ba Improve "Invalid affiliation" exception message 2016-10-03 13:12:05 +02:00
Florian Schmaus
810e7c8b78 Prevent GC of connection within pingServerIfNecessary() 2016-09-05 14:56:40 +02: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
98bacb144d Rework blocking command code.
Mostly remove the helper utils. The server is required to present the
client with a consisent state of the block list and corresponding
modifications, so we should not end up with duplicate entires if we
don't check for them.

SMACK-731
2016-08-31 22:16:26 +02:00
Fernando Ramirez
9554c7be26 Add XEP-0191 - Blocking Command implementation
SMACK-731
2016-08-31 08:07:36 +02:00
Florian Schmaus
d37d26547c Improve MUC code and documentation
- use JID types
- make clases immutable
2016-08-03 19:12:57 +02:00