1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-18 02:02:04 +01:00
Commit graph

4293 commits

Author SHA1 Message Date
Florian Schmaus
565397f632 [pubsub] Make FillableSubscribeForm implement SubscribeFormReader 2020-05-15 11:54:49 +02:00
Florian Schmaus
4cb214ef8f
Merge pull request #367 from vanitasvitae/carbonEnable
Allow for offline configuration of CarbonManager
2020-05-15 11:31:23 +02:00
Florian Schmaus
17161dd3ff
Merge pull request #359 from vanitasvitae/messageRetraction
XEP-0424: Message Retraction
2020-05-14 22:34:37 +02:00
429c89d59a Add support for XEP-0424: Message Retraction
SMACK-886
2020-05-14 17:48:20 +02:00
Florian Schmaus
bdedf5a0a2
Merge pull request #368 from vanitasvitae/fallbackIndication
XEP-0428: Fallback Indication
2020-05-14 17:45:06 +02:00
Florian Schmaus
c5212c20b6 [xdata] Rename FormReader.read(String) to getField(String)
Now that FormWriter, with its write() method, is gone, there is no
reason the FormReader method should still be named read(). Renaming to
getField() as this is what DataForm also uses.
2020-05-14 17:13:01 +02:00
Florian Schmaus
d6c1018b47 [xdata] Remove FormWriter
The FormWriter interface was a left over from the initial design of
the reworked API, but is no longer required.
2020-05-14 17:13:01 +02:00
Florian Schmaus
62ead2fbb3
Merge pull request #391 from vanitasvitae/typo
Quick typo fix: s/isntead/instead/g
2020-05-14 17:04:31 +02:00
d903184ee2
Quick typo fix: s/isntead/instead/g 2020-05-13 22:32:18 +02:00
Florian Schmaus
3ab44050cc
Merge pull request #390 from adiaholic/docFix
Correct spellings wherever needed in `connection-modules.md`
2020-05-13 22:29:14 +02:00
ffb8729ba7 Allow for offline configuration of CarbonManager 2020-05-13 22:28:48 +02:00
adiaholic
afa42a8b41 Remove TODO:method should not throw any exception but currently does
`mgr.getNode(...)` method is not supposed to throw any type
of exception. It threw two kinds of exceptions: `NotConnectedException`
and `SmackException`.
By using `ThreadedDummyConnection.newInstance()` method,
`NotConnectedException` can be removed. And `SmackException`
can be removed by correctly building the DiscoverInfo packet.
2020-05-13 22:25:22 +02:00
Florian Schmaus
321c91c264 [build] Introduce bouncyCastleVersion variable and use it
Also bumps bouncy castle to 1.65.
2020-05-13 22:20:32 +02:00
39a6e7e888
Add support for XEP-0428: Fallback Indication
Fixes SMACK-889
2020-05-13 22:18:09 +02:00
Florian Schmaus
cd96909ac4
Merge pull request #378 from vanitasvitae/bumpPgpainless
Bump pgpainless to 0.0.1-alpha11 and test-depend on bcprov
2020-05-13 22:17:15 +02:00
Florian Schmaus
50cb7735d1 [muc] Add generic callback invoked if a participant is removed
Fixes SMACK-883.
2020-05-13 22:14:43 +02:00
Florian Schmaus
ab2d3a2b79 [core] Deprecate AbstractConnectionListener 2020-05-13 22:14:43 +02:00
Florian Schmaus
13abeb9626 [muc] Deprecate DefaultUserStatusListener 2020-05-13 22:01:17 +02:00
Florian Schmaus
aacd94c62e [muc] Deprecate DefaultParticipantStatusListener 2020-05-13 22:00:42 +02:00
Florian Schmaus
498dde2d86 Merge branch 'master' of github.com:igniterealtime/Smack 2020-05-13 20:20:01 +02:00
Florian Schmaus
77e26fc575 Re-work data form API
Apply builder pattern to form fields and replace getVariable() with
getFieldName(). Refer to the field name as "field name" instead of
"variable" everyone, just as XEP-0004 does.

Improve the high-level form API: introduce FilledForm and FillableForm
which perform stronger validation and consistency checks.

Also add FormFieldRegistry to enable processing of 'submit' forms
where the form field types are omitted.

Smack also now does omit the form field type declaration on 'submit'
type forms, as it is allowed by XEP-0004.
2020-05-13 20:14:41 +02:00
adiaholic
ddb27b6965 Correct spellings wherever needed in connection-modules.md 2020-05-13 15:31:19 +05:30
Florian Schmaus
25a5261dc0
Merge pull request #389 from guusdk/pep-notification-message-type
pep: notification type can be normal or headline
2020-05-12 20:07:43 +02:00
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
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