Commit Graph

4470 Commits

Author SHA1 Message Date
Guus der Kinderen 577c59484b pep: notification type can be normal or headline 2020-05-12 19:57:56 +02:00
Florian Schmaus 3270c113c5 [filetransfer] Remove FaultTolerantNegotiator
The FaultTolerantNegotiator is the reason why Smack replies in a
non-standard way to file transfer requests: Smack puts two values in
the stream-method field, while the field is a list-single field,
i.e. a field which only allows one value.

Even if what Smack does is probably better, as it allows for a
fallback in case the bytestream transport fails, it is not standard
compliant. And, Jingle provide a proper fallback specification for
file transfers.

Fixes SMACK-561.
2020-05-11 22:12:22 +02:00
Florian Schmaus 2c39dff653 pubsub: remove 'replyto' and 'replyroom' configure settings
Those configurations where removed with version 1.13 (2010-07-12) of
XEP-0060.

This change is part of the effort to upgrade Smack's PubSub
implementation (SMACK-364).
2020-05-04 10:55:36 +02:00
Florian Schmaus f61ecb65e7 Make java(c|doc) use --release when available
In order to truely stay Java 8 compatible, declaring a source and
target compatiblity is not sufficient. Source compatiblity means that
the input, i.e. the code written in Java is compatible with that
particular version of the Java Language Specification (JLS). And
target compatibitliy means that the produced Java bytecode is
compatible with that particular version of the Java Virtual Machine
Specificiation (JVMS).

But there is actually a third dimension: the runtime
library (rt.jar). If signatures of methods change over java releases
within the runtime library, then the produced bytecode, may contain
calls to methods that do not exist with that exact same signature in
older java versions.

For example the family of Buffer subclasses changed the return value
of certain functions, for example flip() to not return Buffer, but the
concrete type of the current instance, e.g. CharBuffer.

If we compile now with a newer JDK, where the return type is
CharBuffer and not Buffer, then executing on an older JDK, where the
return type is Buffer, then we get java.lang.NoSuchMethodError(s)
thrown at us.

Fixes SMACK-651.
2020-04-24 10:15:13 +02:00
Paul Schaub e9f427084d
Bump pgpainless to 0.0.1-alpha11 and depend on bcprov in tests 2020-04-21 19:52:05 +02:00
Florian Schmaus e79710840b caps: handle multiple data forms of extened service discovery information 2020-04-18 22:56:24 +02:00
Florian Schmaus 5e921e6393 core: add javadoc for StanzaView.getExtensions(Class) 2020-04-18 22:56:10 +02:00
Florian Schmaus dc443bccd4 disco: allow multiple data forms for extended discovery information
Previously Smack only supported a single data form as extended
discovery information.
2020-04-18 19:04:21 +02:00
Florian Schmaus cdc5396f6c core: improve signature of Stanza.addExtensions() 2020-04-18 19:03:43 +02:00
Florian Schmaus 661b2743d9 mam: use new DataForm API in MamQueryIQ
Use the new API introduced with e58e6fa75 ("xdata: add more helper
methods to DataForm") in MamQueryIQ.
2020-04-18 19:03:00 +02:00
Florian Schmaus e58e6fa75d xdata: add more helper methods to DataForm 2020-04-18 19:02:45 +02:00
Florian Schmaus 8e1003723e Specify correct and full version in @since javadoc tag
The next release of Smack will be 4.4.0.
2020-04-18 19:02:30 +02:00
Florian Schmaus d0347d1e00 muc: add removed() callback to UserStatusListener 2020-04-17 22:26:28 +02:00
Jesus c07f41c119 debug: show active tab on Smack debugger startup
Enhanced Debugger Window showed Smack Info tab, now shows active
connection. Fixes SMACK-367.
2020-04-17 21:03:05 +02:00
Florian Schmaus 5c5dfedce2
Merge pull request #383 from adiaholic/docFix
Correct erroneous documentation
2020-04-17 21:02:28 +02:00
Florian Schmaus 72b9f79692
Merge pull request #385 from adiaholic/bugFix
Remove unexpected `MucNotJoinedException` from `MultiUserChat.leave()`
2020-04-17 21:02:14 +02:00
adiaholic 22cff274bb Remove unexpected `MucNotJoinedException` from `MultiUserChat.leave()`
Occupant information should be reset after `leavePresence`
and `reflectedLeavePresenceFilter` are built.
2020-04-17 20:10:45 +05:30
Florian Schmaus c3c14cfdb9 gradle: remove nonStrictJavadocProjects
This become obsolete with 1a3067c89 ("Enable werror for javadoc and
fix javadoc issues"), which enabled 'werror' for javadoc on all
projects.
2020-04-17 10:29:40 +02:00
Florian Schmaus 0f7b7df1f0 muc: fix roomDestroyed() callback
The previous site where the callback was invoked was only reached if
there was also a user status on the unvailable presence. But those are
not part of unavilable presences upon room destruction.

Fixes SMACK-888.
2020-04-16 21:59:19 +02:00
Florian Schmaus 20aaef2628 muc: remove 'joined' boolean from MultiUserChat, use myRoomJid instead
If myRoomJid is set, we are joined.
2020-04-16 21:44:55 +02:00
Florian Schmaus 26ab832452 muc: only call userHasLeft() at one site
There is no need to duplicate that code. Also ensure that
userHasLeft() is invoked *before* the listeners are invoked, so that
e.g. isJoined() returns false in the listeners.
2020-04-16 21:40:06 +02:00
Florian Schmaus ab2822be3e muc: also set myRoomJid to null if we have left the room 2020-04-16 21:39:52 +02:00
Florian Schmaus c519dd1213 muc: do check for equality twice
We already performed the presence.getFrom().equals(myRoomJID) check
and saved its result. No need to do it again.
2020-04-16 21:38:55 +02:00
Florian Schmaus e2e228fc93 muc: synchronize Stats.create(Integer)
Since this method is used by the MUCUserProvider, it is potentially
invoked concurrently and the access to the statusMap must be
synchronized then.
2020-04-16 21:20:53 +02:00
Florian Schmaus fa643f12d5 muc: add MUC status code 33
SMACK-882
2020-04-16 21:20:35 +02:00
Florian Schmaus 162651821e sinttest: log unexpected Throwables thrown by runTests()
Because we would not see those if the finally block also threw.
2020-04-15 19:48:39 +02:00
Florian Schmaus da5f59a996 Remove superfluous ' "" +' statements
Using

sed -i 's; "" +;;' <file>

to remove those.
2020-04-15 09:35:13 +02:00
Florian Schmaus 77d12d4758 fastening: set ENABLED_BY_DEFAULT to false
If it is announced as feature, entities sending fastened messages
expect the recipient to react somehow on those. And this is not the
case if this is just enabled in Smack.

Hence we disable it per default and require smack users to explicitly
enable it after they have setup the according stanza listeners.
2020-04-15 09:34:04 +02:00
Florian Schmaus cda764d62d Merge branch 'master' of github.com:igniterealtime/Smack 2020-04-15 09:30:04 +02:00
Florian Schmaus 4f3d89e666
Merge pull request #355 from vanitasvitae/messageFastening
Message fastening
2020-04-15 09:29:02 +02:00
adiaholic 38c77fd573 Correct erroneous documentation 2020-04-14 16:38:41 +05:30
Florian Schmaus cbc2024875 sinttest: print smack version 2020-04-14 09:20:43 +02:00
Florian Schmaus 7f2e8b793a
Merge pull request #379 from akrherz/travis
update Travis-CI badge on README.md
2020-04-13 23:03:51 +02:00
Florian Schmaus ad13effe41
Merge pull request #382 from vanitasvitae/typo
Fix typo in XmppElementUtil
2020-04-13 23:03:34 +02:00
Florian Schmaus f3e93cef32 core: do not init() closingStreamReceived sync point in initState()
The initState() method is also called in disconnect(). And if we reset
the closingStreamReceived sync point at disconnect, it will break the
WaitForClosingStreamElementTest integration test.
2020-04-13 22:50:02 +02:00
Florian Schmaus dd248adb28 sinttest: delcare boolean in WaitForClosingStreamElementTest 2020-04-13 22:49:31 +02:00
Florian Schmaus 6c3cd53567 pep: improve pep event filter 2020-04-13 22:37:54 +02:00
Florian Schmaus 7f027bd339 pep: Use EventItemsExtensionFilter 2020-04-13 22:37:54 +02:00
Florian Schmaus 2c6f444bab pubsub: Add EventItemsExtensionFilter 2020-04-13 22:37:54 +02:00
Florian Schmaus 50da46ffda core: Add ExtensionElementFilter 2020-04-13 21:27:31 +02:00
Florian Schmaus 5114f6dfa4 core: remove deprecated methods in PacketUtil
Those where deprecated in 2015 with 8409dddff ("Add
PacketUtil.extensionElementFrom()"), and in 2017 with
2288825b1 ("Retain smack-core API").
2020-04-13 21:25:28 +02:00
Florian Schmaus fb7054bbe7 core: delete deprecated ToFilter
This filter was marked deprecated in 2017 with 5d0dd49e6 ("Introduce
ToMatchesFilter"), time to delete it.
2020-04-13 20:54:04 +02:00
Florian Schmaus 988954a9db core: delete deprecated filters
Those where deprecated in 2015 with d4a6d8e65 ("Rename
PacketFilter (and implementing classes) and PacketExtension"), now it
is time to delete them.
2020-04-13 20:52:07 +02:00
Florian Schmaus aea95d3401 sinttest: also check for length of subdescriptions varargs 2020-04-13 20:46:59 +02:00
Florian Schmaus c49999b933 core: add shortcut via hash in EqualsUtil
Return false as soon as the hashed value does not match. This is
sound, since every class that implements equals(Object) should also
implement hashCode().
2020-04-13 20:40:10 +02:00
Florian Schmaus 4f609b855c geoloc: make GeoLocation implement hashCode() and equals(Object) 2020-04-13 20:40:10 +02:00
Florian Schmaus f5c412a98f geoloc: GeoLocation constructor should have Builder as sole paramter
Also remove that (broken) "Error and accuracy set" warning, but
mark (get|set)Error() as deprecated.
2020-04-13 20:39:43 +02:00
Paul Schaub 905d5dc102
Fix typo in XmppElementUtil 2020-04-13 18:18:31 +02:00
Paul Schaub e0f7ddf5a8
Add support for XEP-0422: Message Fastening
SMACK-884
2020-04-13 18:17:26 +02:00
Paul Schaub 72a9cb65a6 OriginIdElement: Add proper equals() method 2020-04-13 17:38:47 +02:00