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
Alvaro Parker
2ff89a9e42
fix typos
2024-09-16 18:29:44 -03:00
Jonas Schäfer
a503c8534f
parsers: add support for handled-count-too-high error
2024-09-01 13:01:29 +02:00
Jonas Schäfer
0f0759b207
parsers: add support for <optional/> in stream management feature
2024-09-01 13:01:29 +02:00
Jonas Schäfer
b39ad99ecd
parsers: add stream error XSO
2024-09-01 08:54:50 +00:00
Emmanuel Gil Peyrot
cb2c4133fe
xmpp-parsers: Convert Forwarded to xso
2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
d4f6812386
xmpp-parsers: Convert cert_management to xso
...
This introduces a breaking change by moving from a bool to an
Option<NoCertManagement>, which will be reverted eventually once we add
support for #[xml(flag)] types of children.
2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
d8e08df464
xmpp-parsers: Implement XEP-0478: Stream Limits Advertisement
...
This allows servers to communicate their maximum stanza limit, as well
as idle time limit.
2024-08-07 20:59:30 +02:00
Emmanuel Gil Peyrot
3f61050944
xmpp-parsers: Implement XEP-0388: Extensible SASL Profile
2024-08-06 16:36:11 +02:00
Emmanuel Gil Peyrot
de2ba97f79
xmpp-parsers: Implement XEP-0440: SASL Channel-Binding Type Capability
2024-08-06 16:36:10 +02:00
Emmanuel Gil Peyrot
95d08e3c1e
xmpp-parsers: Simplify RTT implementation using more xso
...
Especially exhaustive enums are super useful for this kind of pattern.
2024-08-05 15:02:25 +00:00
Jonas Schäfer
1e0bccc504
parsers: port extracts over to derive macros
2024-08-03 15:17:30 +02:00
Jonas Schäfer
6afd0ef52f
parsers: port enums over to derive macros
2024-08-03 12:19:42 +02:00
5110d5fa96
Support <stream:features> in parsers
2024-08-02 18:25:32 +00:00
Emmanuel Gil Peyrot
387fccce4a
xmpp-parsers: Write the ChangeLog for 0.21.0
2024-07-25 17:39:42 +02:00
Emmanuel Gil Peyrot
c631e4eff4
xmpp-parsers: Implement XEP-0386: Bind 2
...
This depends on XEP-0313 for its MAM metadata, and many others such as
XEP-0198, XEP-0280 and XEP-0352 for the inline features, but we
currently provide those as minidom Elements instead.
2024-07-03 23:11:23 +00:00
Emmanuel Gil Peyrot
32e8f2ec2e
xmpp-parsers: Implement XEP-0484: Fast Authentication Streamlining Tokens
...
This specification defines a token-based method to streamline
authentication in XMPP, allowing fully authenticated stream
establishment within a single round-trip.
2024-07-01 05:53:48 +00:00
034976748a
Add serde feature for xmpp crate
2024-06-05 11:20:33 +02:00
Maxime “pep” Buquet
3a0336bed0
parsers: re-export the jid module entirely
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-10-26 14:03:21 +02:00