Commit graph xmpp-rs/parsers/ChangeLog
Author SHA1 Message Date
Jonas Schäfer
1710a6f99e Release all crates
Since we tie the versions rather tightly, we have to release the entire
bunch in order to allow people to upgrade to rxml 0.14.
2026-06-11 17:25:32 +02:00
Link Mauve
d0b28a94b0 Implement XEP-0463: MUC Affiliations Versioning 2026-06-11 13:23:18 +00:00
O01eg
24ae2ffd73 xmpp-parsers: Add 'approved' attribute to roster item 2026-06-10 21:24:24 +00:00
Link Mauve
0ef8c215d7 xmpp-parsers: Move the Stanza type from tokio-xmpp
It doesn’t come with the ensure_id() method, but otherwise this is a
much better location for it.
2026-06-10 17:59:26 +02:00
Jonas Schäfer
f78ea06bfb parsers: make inner pieces of bind.rs structs accessible 2026-06-06 14:04:01 +02:00
Paul Fariello
3d38a54389 Add XEP-0333 Displayed markers
Add XEP-0333 Displayed markers
2026-05-09 22:08:10 +02:00
Jonas Schäfer
e2dcd8ac66 Stop being pedantic by default
Up to now, the xmpp-rs projects have been very strict about incoming
data. This has served us, as developers of the libraries, well,
uncovering bugs in our and remote implementations which we could then
get fixed.

However, this behaviour is unexpected to users of the library. In the
XMPP world, unexpected child elements and attributes are generally
expected to be ignored. While this could be opted-into previously, the
feature flag for that sounded more dangerous than it was
("disable-validation"). In addition, the tribal knowledge needed to know
about that feature flag may not have reached some people who tried the
library and gave up because of that.

With this change, we make the non-pedantic behaviour the default. For
development and debugging purposes, users can always opt into the
pedantic behaviour as needed, using the newly-introduced `pedantic`
feature flags on all affected crates.
2026-03-27 12:51:51 +01:00
Jonas Schäfer
65c1f5ab10 parsers: fix tests with --features disable-validation and/or component
This disables a bunch of tests when the component feature is disabled,
because that feature changes the namespace of the <message/> element,
which causes the tests to fail.

Thanks to debacle for finding this.
2026-03-03 17:41:27 +01:00
Link Mauve
bc88134c41 xmpp-parsers: Make DiscoInfoResult::features a BTreeSet
Features must never be duplicated, so we can use a BTreeSet instead of a
Vec to be nicer for users.

It makes the internal API for computing caps and ecaps2 a bit worse,
because it was expecting a slice directly, so for now let’s collect the
BTreeSet into a Vec when computing the thing.  A refactor to use
Iterator might make it better eventually, but I won’t work on that
before profiling it.
2026-02-21 20:58:33 +01:00
Link Mauve
946d96d7c8 xmpp-parsers: Remove Feature from disco#info
This was just a newtype for a String, but in general using it was harder
than without it.  This simplifies the public API.
2026-02-21 20:19:07 +01:00
Link Mauve
954efd2673 xmpp-parsers: Add XEP-0494 (Client Access Management) 2026-02-21 11:50:34 +01:00
Link Mauve
6d18641ace xmpp-parsers: Add support for <bandwidth/> in Jingle RTP Description
This was missing according to the specification, but I have never seen
it used in the wild.
2026-02-21 11:40:46 +01:00
Link Mauve
3107259337 xmpp-parsers: Use #[xml(extract)] for the two values
This simplifies the API, and avoids extra newtypes.
2026-02-21 11:38:01 +01:00
Link Mauve
dbe7925d83 xmpp-parsers: Use #[xml(flag)] for rtcp-mux
Also test that it gets deserialized correctly.
2026-02-21 11:36:35 +01:00
Link Mauve
4d6e1363db xmpp-parsers: Replace bind::Required with an #[xml(flag)]
This makes the code simpler to read.
2026-02-21 11:36:34 +01:00
Link Mauve
ca6e04f931 xmpp-parsers: Simplify StreamFeatures::sasl_mechanisms
This was already just a wrapper around a Vec<String>, but we can do away
with the wrapper thanks to #[xml(extract)].

I’ve also replaced Vec with BTreeSet, since that corresponds better to
how the mechanisms are.
2026-02-21 11:34:05 +01:00
Jonas Schäfer
0c6772aa7d parsers: derive Default for ibr::LegacyQuery
Very useful when composing a query.
2026-02-21 08:49:56 +00:00
Link Mauve
4f11d2fe5c xmpp-parsers: Implement XEP-0507: Jingle Content Category
This gives the semantic of each video contents in a Jingle session.
2026-02-18 18:00:20 +00:00
Link Mauve
d0062d9931 xmpp-parsers: Split ibr::Query into multiple structs
This introduces FieldsQuery, RemoveQuery, LegacyQuery and FormsQuery,
making this module reflect more accurately how it gets used on XMPP.
2026-01-09 00:49:17 +01:00
Link Mauve
f1e5ac6ac8 xmpp-parsers: Make Priority’s inner i8 pub
We forgot to make it pub before, but should have.

This was a regression from 893a2f8e47,
when we converted it to xso.

Fixes #166.
2025-12-25 01:17:11 +01:00
Link Mauve
8c2b1df7f7 xmpp-parsers: Fix the type of jingle_rtp/ssrc to u32
XEP-0167 has been updated to version 1.2.3, to change the type of the
'ssrc' attribute to u32 (from String).  This is in accordance with
RFC 3550 (RTP), which defines it as a randomly-chosen 32-bit unsigned
integer.

Additionally, the docstring was completely wrong.
2025-12-03 12:26:30 +01:00
Link Mauve
5ed958582b Fix all typos using the typos tool
See https://github.com/crate-ci/typos
2025-11-22 21:48:21 +00:00
pep
7a1dde7cfb parsers: Bump to 0.22.0
Signed-off-by: pep <pep@bouah.net>
2025-11-01 17:34:37 +01:00
pep
e95f884e44 parsers: clippy
Signed-off-by: pep <pep@bouah.net>
2025-11-01 16:30:22 +01:00
pep
7d47173318 parsers/stanza_error: fix tests behind 'component' feature
Signed-off-by: pep <pep@bouah.net>
2025-10-21 23:40:00 +02:00
Link Mauve
9d91b02dfd Revert "xmpp-parsers: Remove optional child from sm element"
This reverts commit 0a1b291574 once again.

This is currently required to connect to Prosody, otherwise the parser
will choke on the extra undocumented child.

I still wonder if required (4e0cd5d96b)
would be useful to support then, as it might also be found in the wild.
2025-09-08 11:37:24 +02:00
PulkoMandy
155ad9b670 parsers: Add Confirm from XEP-0070 2025-08-29 11:40:25 +00:00
Link Mauve
0a1b291574 xmpp-parsers: Remove optional child from sm element
When the required child was added and subsequently reverted, it was
noted that optional and required were never defined, and only appeared
in old XEP-0198 examples.  The XEP has been fixed already[1].

This basically reverts 0f0759b207.

[1] https://github.com/xsf/xeps/pull/1447
2025-08-29 12:48:55 +02:00
Maxime “pep” Buquet
621c5882cf
parsers: re-export xso::error::FromElementError
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2025-08-14 15:24:09 +02:00
Jonas Schäfer
af7e47a791 Add changelog entry for starttls nonzas
They have been added in 54e1a98cd already.
2025-07-09 17:18:31 +02:00
Maxime “pep” Buquet
dc2477eec3 Revert "xmpp-parsers: Support required in SM feature"
This reverts commit 4e0cd5d96b.
2025-06-03 23:18:10 +02:00
Link Mauve
4e0cd5d96b xmpp-parsers: Support required in SM feature
This was forgotten in 0f0759b207.

That element is only specified in the XML schema, its semantics aren’t
defined anywhere, but we can guess them anyway.
2025-06-03 23:03:13 +02:00
Jonas Schäfer
dc8c3eac4c parsers: port Iq to use the derive macros 2025-05-13 12:01:21 +00:00
Jonas Schäfer
75e0cb7dc3 parsers: improve xml:lang handling
This is still far from being a full fix. Still, we can avoid the lang
attribute (by allowing discarding the `xml:lang` value via the feature
introduced a couple commits ago) and we can avoid emitting `xml:lang=""`
where no language was previously set using the mechanism introduced for
<message/> in 5172fb5e.
2025-04-18 13:16:21 +02:00
Jonas Schäfer
5172fb5e0f parsers: port Message to use the derive macros 2025-04-18 12:56:03 +02:00
Jonas Schäfer
134255d1de parsers: port data_forms to use derive macros 2025-04-18 10:49:26 +02:00
Maxime “pep” Buquet
1b635854ad parsers: clippy run
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2025-04-08 13:57:21 +02:00
Maxime “pep” Buquet
a1247a0e3c parsers: Add support for XEP-0335: JSON Containers
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2025-04-07 18:35:43 +00:00
Jonas Schäfer
84c4b5731c parsers: port stanza_error over to derive macros 2025-04-06 08:36:15 +02:00
Jonas Schäfer
7faa6dc15b parsers: port time over to derive macros 2025-04-03 21:42:02 +02:00
Saarko
932575c8d6 xmpp_parsers: Add Push Notifications (XEP-0357)
Add support for Push Notification parsing according to https://xmpp.org/extensions/xep-0357.html version 0.4.1.
2025-02-25 14:47:08 +02:00
Emmanuel Gil Peyrot
5cbe5936a6 xmpp-parsers: Use xso for pubsub owner
Also merge its direct children into its enum fields.
2025-02-12 20:06:29 +01:00
Emmanuel Gil Peyrot
205857e59c xmpp-parsers: Remove MIX support
This protocol has failed to gain any traction in the XMPP ecosystem and
is actively being replaced with better alternatives based on MUC.
2025-02-12 18:56:40 +01:00
Emmanuel Gil Peyrot
e7395b7ed8 xmpp-parsers: Add a lang property to Presence
This is a workaround for rxml not handling @xml:lang properly yet.
2025-02-12 17:48:04 +00:00
Emmanuel Gil Peyrot
c497967b1c xmpp-parsers: Reduce component handshake allocations
This function always appends to an existing string, so by passing it a
String directly we can avoid superfluous allocations.

Also tokio-xmpp was doing a bunch of &str to String for no reason around
there, let’s remove that too.
2025-02-10 17:06:15 +00:00
Emmanuel Gil Peyrot
fa61f421bb xmpp-parsers: Use xso for pubsub events
Also split the PubSubEvent enum into Event and Payload.
2025-01-27 15:07:59 +01:00
Emmanuel Gil Peyrot
543d9eb590 xmpp-parsers: Convert http_upload::Header to xso
We can’t use generate_attribute!() for HeaderName because it has to be
case insensitive.
2025-01-27 14:45:17 +01:00
Emmanuel Gil Peyrot
f63b780089 xmpp-parsers: Simplify PubSub Item using xso
Now that we can have a single arbitrary payload, we can derive FromXml
and AsXml on the Item.
2025-01-26 16:40:05 +00:00
Emmanuel Gil Peyrot
86b65ab447 xmpp-parsers: Split vCard-temp iq get into new VCardQuery
There is no reason to force users to use the same struct for both.
2025-01-26 12:19:43 +01:00
Emmanuel Gil Peyrot
244a9bbbf2 xmpp-parsers: Switch from zero-sized types to #[xml(flag)]
That way we can simply use true/false, instead of
Some(TheZeroSizedType)/None.
2025-01-25 20:07:47 +01:00