Commit graph xmpp-rs/xmpp/src/lib.rs
Author SHA1 Message Date
pep
a1a31ce11c xmpp: Merge Agent configuration into new Config struct
Signed-off-by: pep <pep@bouah.net>
2025-11-30 16:36:58 +01:00
pep
147b79ca52 xmpp: new Config struct for Agent, with bookmarks_autojoin for now
Signed-off-by: pep <pep@bouah.net>
2025-11-30 16:36:58 +01:00
Jonas Schäfer
ccdf27117d Fix docs build with current nightly
skip-changelog, we don't officially support nightly.

See-Also: https://github.com/rust-lang/rfcs/pull/3631
See-Also: https://github.com/rust-lang/rust/pull/138907
2025-10-08 13:03:39 +02:00
Maxime “pep” Buquet
fbdd5f7b54 xmpp: document 'escape-hatch' feature
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2025-09-01 17:37:07 +00:00
Jonas Schäfer
fc8b581593 Clean up tls-related feature flags
This provides a clear and consistent interface for selecting TLS-related
features on both (xmpp and tokio-xmpp) crates. All feature checks have
been revamped. All working combinations have been tested (including a
connectivity test + --all-features docs build) using:

```
set -xeuo pipefail
features=(aws_lc_rs ring ktls,aws_lc_rs ktls,ring aws_lc_rs,ring aws_lc_rs,ring,ktls native-tls rustls-any-backend)
export RUSTFLAGS=" -D warnings"
cargo test --no-default-features
cargo test
for feature in ${features[@]}; do
  echo ">>> BUILDING with $feature" 2>&1
  # Running code or building examples cannot succeed with rustls-any-backend.
  features="starttls,$feature"
  if [ "$feature" != 'rustls-any-backend' ]; then
    if ! cargo test --no-default-features --features="$features"; then
      echo ">>> BUILD FAILED for tls feature set: $features" >&2
      exit 1
    fi
    set +e
    timeout -sINT -p -k 2 3 cargo run --no-default-features --features="$features" --example keep_connection -- test@hub.sotecware.net "$(pass xmpp/test@hub.sotecware.net)"
    status="$?"
    set -e
    if [ $status -ne 0 ]; then
      echo ">>> keep_connection did not shut down cleanly! (status: $status)" >&2
      exit 1
    fi
  else
    if ! cargo build --no-default-features --features="$feature"; then
      echo ">>> BUILD FAILED for tls feature set: $features" >&2
      exit 1
    fi
  fi
done
RUSTDOCFLAGS="--cfg docsrs" RUSTFLAGS="--cfg xmpprs_doc_build" cargo +nightly doc -Zrustdoc-map --all-features
```
2025-05-10 22:02:39 +02:00
Link Mauve
5ae38545e4 xmpp: Shorten the default caps node to our main domain
We do own xmpp.rs, so let’s use that instead of gitlab.com.
2025-04-07 11:57:01 +02:00
33098e6f2c Message and message_correct::Replace now has typed Id 2024-12-30 20:50:43 +00:00
668cc05445 xmpp: Replace std stuff with alloc/core stuff 2024-12-19 20:39:18 +01:00
c1a3c85556 xmpp: Implement Deref<Target=ResourcePart> for RoomNick 2024-12-18 21:55:03 +01:00
793b76d0d5 xmpp: More nicks are typed as RoomNick 2024-12-18 21:55:01 +01:00
48cb79b2d1 xmpp: Implement FromStr for RoomNick 2024-12-18 21:26:30 +01:00
7991cef904 Add tests for crate exports ; add structure to imports/exports 2024-12-18 18:03:18 +00:00
3fd8285a29 xmpp: RoomNick is newtype wrapper for ResourcePart 2024-12-18 15:43:09 +00:00
c16456f381 parsers/xmpp: MUC bookmarks have nickname typed as ResourcePart 2024-12-18 15:43:09 +00:00
Jonas Schäfer
35ce86243f client: use stanzastream! 2024-12-17 18:16:02 +01:00
0b58561003 Rename AsyncClient to Client 2024-08-10 16:57:51 +02:00
23e943825f xmpp::Agent::wait_for_events cannot error 2024-08-08 15:43:52 +02:00
fa99c09585 Indicate which feature flag for each module/type 2024-08-05 11:14:41 +02:00
eb51b05c13 Reexport tokio_xmpp from xmpp crate 2024-07-31 16:58:30 +00:00
Emmanuel Gil Peyrot
5fc12c45b5 xmpp: Use tokio-xmpp’s reexports of jid and minidom 2024-07-25 14:36:09 +00:00
moparisthebest
54de8d9951
Fix building xmpp with no-default-features 2024-01-03 20:01:05 -05:00
moparisthebest
38bfba4a18
xmpp crate now supports ServerConnector 2024-01-03 19:34:02 -05:00
moparisthebest
733d005f51
DNS/TLS deps are now optional, component now also uses ServerConnector 2024-01-01 02:09:41 -05:00
moparisthebest
3cab603a4c
Add AsyncServerConnector to AsyncClient to be able to support any stream
Unfortunately API breaking unless we do some export mangling
2024-01-01 02:08:13 -05:00
3d9bdd6fe2 Add StanzaTimeInfo for <delay> (XEP-0203) 2023-12-31 21:07:12 +01:00
dbf053f576 Move Agent to agent module 2023-12-31 13:46:39 +01:00
f6c47dd394 Move send_message to message::send module 2023-12-31 13:46:20 +01:00
0e31739934 Move send_room_private_message to muc::private_message module 2023-12-31 13:44:10 +01:00
fecacf84c3 Move join_room and leave_room to muc::room module 2023-12-31 13:42:18 +01:00
7622721ec6 Move make_initial_presence to presence::send module 2023-12-31 13:42:00 +01:00
379d3cfbe6 Move wait_for_events to event_loop module 2023-12-31 13:40:03 +01:00
f95d968a9f Move upload_file_with to upload::send module 2023-12-31 13:36:39 +01:00
d689759439 Move handle_disco_info... to disco module 2023-12-31 13:33:59 +01:00
a82b48debc Move Event to event module 2023-12-31 13:33:37 +01:00
0bbc089480 Move ClientFeature to feature module 2023-12-31 13:28:48 +01:00
77ee7c15fa Move ClientBuilder and ClientType to builder module 2023-12-31 13:28:32 +01:00
b4caea19d4 Move handle_upload_result to upload module 2023-12-31 13:26:43 +01:00
75b864a5f9 Move handle_iq to iq module 2023-12-31 13:24:27 +01:00
bc28a77d5f Move handle_presence to presence mod 2023-12-31 13:22:06 +01:00
82bb418cf3 Move handle_message to message module 2023-12-31 13:18:41 +01:00
a6b07d4435 Workaround prosody bug 1664
https://issues.prosody.im/1664
2023-12-16 20:01:17 +01:00
4f8dc68b1b Perform legacy or modern bookmarks depending on disco#info result on account 2023-12-16 17:32:07 +01:00
5fbba5c925 Receive legacy XEP-0048 v1.0 bookmarks 2023-12-16 17:29:01 +01:00
Werner Kroneman
ba48f6de46 Lazily bubbling the XMPP event up to the Disconnected event. 2023-12-15 23:23:56 +00:00
Maxime “pep” Buquet
4089891f6c Update edition to 2021
- Remove TryFrom/Into and FromIterator imports
- Prevent impl_validator_using_provider macro in sasl crate from
  constructing trait object

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-12-15 19:40:09 +00:00
Werner Kroneman
2b433d7036 Added a link to the Brussels meeting minutes about auto-join. 2023-12-09 13:29:32 +01:00
Werner Kroneman
a993770206 Clarified the doc comments for leave_room. 2023-12-09 13:26:23 +01:00
Werner Kroneman
ecd0be4aad Removed weird duplicate RoomJoined at the end of the method. 2023-12-08 20:34:44 +01:00
Werner Kroneman
d2a5634859 Using BareJid + RoomNick instead of FullJid.
Also, corrected wrong XEP reference.
2023-12-08 20:21:28 +01:00
Werner Kroneman
49921ac7d3 Added an attempt to fix the bug where the client misinterprets "unavailable" status (or any other self-status, really) as a RoomJoined event. 2023-12-08 20:14:56 +01:00