1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 15:32:06 +01:00
Commit graph

5148 commits

Author SHA1 Message Date
Florian Schmaus
7024151f5d
Merge pull request #612 from stokito/fix_gradle_plugins
Fix gradle plugins
2024-09-12 11:24:32 +00:00
Florian Schmaus
fc2f258310
Merge pull request #625 from guusdk/typo-2
Fixes spelling (includes one API change)
2024-09-12 11:02:45 +00:00
Florian Schmaus
b44ade562a Merge branch '4.4' 2024-09-12 13:02:16 +02:00
Florian Schmaus
3bb07521bb
Merge pull request #626 from Flowdalic/github-ci-upload-artifacts-v4
[github ci] Bump upload-artifact to v4
2024-09-12 13:01:55 +02:00
Florian Schmaus
b034e614d4 [github ci] Bump upload-artifact to v4 2024-09-12 11:53:56 +02:00
Guus der Kinderen
c85bcadd81 Fixes spelling (includes one API change)
Mostly benign changes. Added one new method to replace a method with a spelling mistake in its name. Kept the old method, marked as 'deprecated'.
2024-09-11 20:03:43 +02:00
Florian Schmaus
38c6dd21b4
Merge pull request #621 from Flowdalic/fillable-forms-only-require-list-fields-to-have-value-set
[xdata] Only require list-multi and list-single fields to have a value
2024-09-02 18:56:02 +00:00
Florian Schmaus
4d790aa7db [xdata] Only require list-multi and list-single fields to have a value
Only list-multi and list-single fields require at least one value when
submitting a form. In other cases, for example XEP-0045's
muc#roomconfig_roomadmins, which is of type jid-multi, is used without
any values to reset the room's admins list.

Fixes SMACK-946.
2024-09-01 21:56:24 +02:00
Florian Schmaus
6c7e88f3a0
Merge pull request #616 from guusdk/SMACK-950_MUC-destroy-password
[muc] Add support for 'password' in room destroy
2024-08-27 09:52:04 +00:00
Florian Schmaus
9c4fcc0931
Merge pull request #614 from guusdk/SMACK-947_MucConfigFormManager-admin-support
Add support for room admin config to MucConfigFormManager
2024-08-27 09:50:24 +00:00
Guus der Kinderen
82385ab4d0 [muc] Add support for 'password' in room destroy
XEP-0045 specifies that an optional alternate venue password value can be provided in a room destruction request and broadcast.

fixes SMACK-950
2024-08-15 14:55:54 +02:00
Guus der Kinderen
3534569a8d Add support for room admin config to MucConfigFormManager
fixes SMACK-947
2024-08-13 15:48:02 +02:00
Sergey Ponomarev
c74ebca955 build.gradle: migrate from jcenter to gradlePluginPortal and upgrade biz.aQute.bnd.builder 2024-08-12 08:47:03 +03:00
Sergey Ponomarev
b85be6572c build.gradle: remove clirr plugin
The clirr plugin is disabled and not used
2024-08-12 08:45:54 +03:00
Florian Schmaus
854f847db3
Merge pull request #610 from guusdk/sint-abstract-muc-contract-change
[sint] Correct for recent API change
2024-07-16 06:29:03 +00:00
Guus der Kinderen
7f3bc3d500 [sint] Correct for recent API change
The commit that introduced these tests was merged at the same time with an API change.
2024-07-15 12:46:16 +02:00
Florian Schmaus
2019e0d943
Merge pull request #609 from guusdk/MUC_revoke-membership-in-membersonly-room
[muc] Invoke ParticipantStatusListener after revokation of membership
2024-07-14 10:47:42 +00:00
Florian Schmaus
17d9b742fc [sinttest] Try to find MUC service where MUC creation is possible 2024-07-14 12:11:22 +02:00
Florian Schmaus
050acc4c53 [sinttest] Add TestNotPossibleException(String, Throwable) constructor 2024-07-14 12:11:21 +02:00
Guus der Kinderen
f0b9955311 [muc] Invoke ParticipantStatusListener after revokation of membership
When an occupant gets its membership revoked in an members-only room, the appropriate method of registered ParticipantStatusListeners should be invoked.
2024-07-14 10:19:05 +02:00
Florian Schmaus
b3ef3c3477
Merge pull request #606 from guusdk/sint_ox-cleanup
[sinttest] XEP-0373 Integration Tests should clean-up
2024-07-09 06:20:25 +00:00
Florian Schmaus
9a87643429
Merge pull request #607 from guusdk/SMACK-945_Actor-nick-in-XML
SMACK-945: MUC Item actor's nick to XML
2024-07-09 06:19:55 +00:00
Guus der Kinderen
7c27a707c8 [muc] MUC Item actor's nick to XML
If an actor's nick is set in `MUCItem` this value should be added to the XMPP representation of the instance.

Fixes SMACK-945
2024-07-08 11:15:38 +02:00
Guus der Kinderen
59706d0294 [sinttest] XEP-0373 Integration Tests should clean-up
After test execution, the OpenPGP for XMPP integration tests should clean up the data published via PEP. This prevents these tests from interfering with other tests.
2024-07-03 16:47:42 +02:00
Florian Schmaus
8fcfe2cc33
Merge pull request #605 from guusdk/sint_roster-cleanup
[sinttest] Cleanup of test fixtures
2024-07-02 12:34:53 +00:00
Guus der Kinderen
426a5efb1d [sinttest] Cleanup of test fixtures
Additional cleanup of test fixtures:
- various tests that change roster/subscription get a roster-reset
- one test that registers a listener now deregisters that listener
2024-07-02 10:50:42 +02:00
Florian Schmaus
d27fef0bae [sinttest] Do not leak stanza listener in MultiUserChatOccupantIntegrationTest 2024-06-27 21:32:13 +02:00
Florian Schmaus
c322ce8046
Merge pull request #601 from guusdk/sint_muc-guarantee-order
[sint] Refactor test to ensure stanza order
2024-06-27 19:21:37 +00:00
Guus der Kinderen
0c9d521084 [sint] Refactor test to ensure stanza order
The test that's modified in this commit asserts that upon MUC join, stanzas are received in a particular order.

The previous implementation depended on several event listeners (one for presence, one for messages) that did not always fire in the same order in which the corresponding stanzas arrived. This made the approach unsuitable to reliably test the order in which stanzas arrive.

This commit stops using Smack's MUC API when trying to collect the order in which stanzas arrive. Instead, it joins a chatroom and listens for its stanzas using basic stanza handling. As this uses exactly one stanza listener, that's guaranteed to be invoked in order of stanza arrival, any synchronicity issue in the previous implementation no longer applies.
2024-06-27 20:30:37 +02:00
Florian Schmaus
47d4cbe094 Merge branch '4.4' 2024-06-27 17:10:29 +02:00
Florian Schmaus
ba02a868f6 [caps] Use DataForm.getFormType() when sorting 2024-06-27 17:09:40 +02:00
Guus der Kinderen
a1e85d644f [caps] Additional test that asserts CAPS dataform ordering
XEP-0115 defines that any dataforms in the disco#info stanza is
ordered prior to the computation of the verification string. This
commit adds a test that verifies that this is done by Smack.

See SMACK-944.
2024-06-27 17:09:40 +02:00
Guus der Kinderen
95adfb3cdf [caps] Ensure dataforms are ordered prior to ver calculation
Fixes SMACK-944.
2024-06-27 17:09:36 +02:00
Florian Schmaus
9254f735c7 [sinttest] Refactor MultiResulitSyncPoint TimeoutException message construction for readability 2024-06-27 16:49:23 +02:00
Florian Schmaus
68fa90435e
Merge pull request #599 from guusdk/sint_assertresult-multisync
[sinttest] Improving assertions for MultiResultSyncPoint
2024-06-27 14:42:22 +00:00
Florian Schmaus
98ff4d8a65
Merge pull request #598 from guusdk/sint_muc-occupant-race
[sinttest] Fix race condition in MUC test
2024-06-27 14:40:23 +00:00
Florian Schmaus
cf8a8466e4 Merge remote-tracking branch 'origin/master' 2024-06-23 09:24:14 +02:00
Guus der Kinderen
98dbc0ee2e [muc] Prevent duplicate processing of mediated invitations
MUC mediated invitations usually have the form

<message
    from='coven@chat.shakespeare.lit'
    id='nzd143v8'
    to='hecate@shakespeare.lit'>
  <x xmlns='http://jabber.org/protocol/muc#user'>
    <invite from='crone1@shakespeare.lit/desktop'>
      <reason>
        Hey Hecate, this is the place for all good witches!
      </reason>
    </invite>
    <password>cauldronburn</password>
  </x>
</message>
(source: XEP-0045 Example 57.)

However, previous versions of XEP-0045 specified an additional <x
xmlns='jabberconference'> element to be included (see
implementation note in XEP-0045). Therefore, a legacy implementation
may emit a mediated invitations in the form of

<message
    from="smack-inttest-mediated-invite-from-8ta77-hw9igz@conference.example.org"
	to="smack-inttest-two-8ta77@example.org">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <invite from="smack-inttest-one-8ta77@example.org"/>
  </x>
  <x xmlns="jabberconference" jid="smack-inttest-mediated-invite-from-8ta77-hw9igz@conference.example.org"/>
</message>

Unfortunately, this matches
MultiUserChatManager.DIRECT_INVITATION_FILTER because
GroupChatInvitation matches <x xmlns="jabberconference"/>. However
the message is not a direct invitation but a mediated one. Besides
this invoking the wrong listeners (direct vs. medidated) the value for
'inviter' that's used to invoke that listener will be false.

To fix this, extend DIRECT_INVITATION_FILTER with
NotFilter.of(MUCUser.class) to avoid matching those legacy mediated
invitations.

Fixes SMACK-943

Co-authored-by: Florian Schmaus <flo@geekplace.eu>
2024-06-23 09:07:51 +02:00
Florian Schmaus
0bb3bf292c [core] Add NotFilter.of(Class<E extends ExtensionElement>) 2024-06-22 20:01:35 +02:00
Florian Schmaus
095ba0a3ee
Merge pull request #603 from guusdk/smackx_package-info-copypaste-bugs
[docs] fix URL for XEP-0372
2024-06-20 07:49:29 +00:00
Florian Schmaus
a4eb5a7b01
Merge pull request #592 from guusdk/sint-versions-for-tests
[sinttest] Add versions for tests
2024-06-20 07:47:17 +00:00
Guus der Kinderen
95c39d2a44 [docs] fix URL for XEP-0372 2024-06-18 16:29:57 +02:00
Guus der Kinderen
7e9a5713e9 [sinttest] Improve test assertion message
Making use of the new assertion handling for MultiResultSyncPoint, the integration test that uses that implementation can now get improved assertion messages. This will allow users to more quickly determine why a test is failing.
2024-06-13 16:01:30 +02:00
Guus der Kinderen
440b497638 [sinttest] Add AssertResult for MultiResultSyncPoint
This adds an AssertResult implementation for MultiResultSyncPoint that mimics the equivalent for ResultSyncPoint.
2024-06-13 16:01:30 +02:00
Guus der Kinderen
adafcdb6d1 [sinttest] Fix race condition in MUC test
When occupant One waits for occupant Two to join the room, One should register the corresponding listener _before_ Two joins.

Without this, a race conditions occurs, where Two could have joined the room before One registered the listener, thus missing the event.
2024-06-13 15:26:42 +02:00
Guus der Kinderen
fc1e670a02 [sinttest] Add version to specref for XEP-0118
The test was originally implemented when version 1.2 of the XEP was the most current version. Later versions of the XEP do not significantly modify the specifications, making it plausible that this implementation matches the current version of the XEP: 1.3.0.
2024-06-12 17:42:18 +02:00
Guus der Kinderen
7d618563f4 [sinttest] Add version to specref for XEP-0232
The test was originally implemented after the most current version of the XEP was published, making it plausible that this implementation matches the current version of the XEP: 0.3.
2024-06-12 17:40:46 +02:00
Guus der Kinderen
3f0933e90e [sinttest] Add version to specref for XEP-0060
The test was originally implemented when version 1.15.7 of the XEP was the most current version. Later versions of the XEP do not significantly modify the specifications (with regards to the functionality that is the subject of the tests), making it plausible that this implementation matches the current version of the XEP: 1.26.0.
2024-06-12 17:38:35 +02:00
Guus der Kinderen
2a6e6c7154 [sinttest] Add version to specref for XEP-0199
The test was originally implemented when version 2.0 of the XEP was the most current version. Later versions of the XEP do not significantly modify the specifications, making it plausible that this implementation matches the current version of the XEP: 2.0.1.
2024-06-12 17:35:46 +02:00
Guus der Kinderen
a40dd35eeb [sinttest] Add version to specref for XEP-0374
The test was originally implemented when version 0.1.2 of the XEP was the most current version. Later versions of the XEP do not significantly modify the specifications, making it plausible that this implementation matches the current version of the XEP: 0.2.0.
2024-06-12 17:34:14 +02:00