Commit graph xmpp-rs/parsers/ChangeLog
Author SHA1 Message Date
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
Jonas Schäfer
330b216f3d parsers: add support for mediated invite syntax 2025-01-25 19:27:58 +01:00
Emmanuel Gil Peyrot
c0e45b6a0f xmpp-parsers: Migrate Caps to xso
The hash member has been split into a hash and a ver members, to reflect
the attributes.
2025-01-25 18:07:44 +01:00
Jonas Schäfer
4eff6303dc Fix compatibility with uuid 1.12
uuid 1.12 introduced the NonNilUuid type, which can, like the Uuid
type, be parsed from a string. The Uuid type now implements
PartialEq<Self> and PartialEq<NonNilUuid>. That breaks type inferrence,
because the compiler now cannot know whether we want to parse a Uuid or
a NonNilUuid.

We thus have to be explicit.
2025-01-21 19:12:23 +01:00
33098e6f2c Message and message_correct::Replace now has typed Id 2024-12-30 20:50:43 +00:00
Emmanuel Gil Peyrot
944c5c7c87 xmpp-parsers: Implement XEP-0377: Spam Reporting 2024-12-21 17:44:55 +01:00
9901141b5f parsers: Rename Message::get_best_owned to get_best_cloned 2024-12-20 00:29:03 +01:00
6e3f31ef46 parsers: Add get_best_{body,subject}_owned methods for Message 2024-12-19 17:46:01 +01:00
50425617b5 parsers: Add Message::extract_valid_payload helper 2024-12-19 17:36:10 +01:00
c16456f381 parsers/xmpp: MUC bookmarks have nickname typed as ResourcePart 2024-12-18 15:43:09 +00:00
Emmanuel Gil Peyrot
7fca02958b xmpp-parsers: Fix jingle thumbnails wrt the XEP changes
Version 0.4.2 added a restriction on width and height to be in the
0..65535 range.  The media-type attribute has always been optional as
well.
2024-12-17 00:27:15 +01:00
Emmanuel Gil Peyrot
011585594f xmpp: Adapt to xmpp-parsers changes wrt autojoin
This attribute is now a simple bool instead of an enum.
2024-12-16 13:32:49 +00:00
Emmanuel Gil Peyrot
866991bda5 xmpp-parsers: Replace all instances of bool attributes with bool
These bring basically nothing, so we can throw them away alongside their
generator macro.
2024-12-16 13:32:49 +00:00
Emmanuel Gil Peyrot
16b232523d xmpp-parsers: Convert vCard-temp to xso
This also keeps all additional elements in the vCard, so they get
serialized back on the wire instead of being dropped.
2024-12-15 17:38:56 +00:00
Emmanuel Gil Peyrot
aaf2dd7925 xmpp-parsers: Convert bookmarks2 to xso 2024-12-15 17:38:56 +00:00
Emmanuel Gil Peyrot
af0bd35e7a xmpp-parsers: Implement XEP-0490: Message Displayed Synchronization
This XEP is used to synchronize where each client has stopped reading a
conversation, so that we can e.g. stop displaying a notification when
the user has read this particular message on a different device.
2024-12-15 17:30:24 +00:00