aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-29 07:05:41 +0200
committerClombrong <cromblong@egregore.fun>2025-06-29 07:18:19 +0200
commit24fd5dc7ca43702a0222298c39b5d09ddcf93a8e (patch)
tree0268c9c18922d57f7edbfde5b14a923ca5943f0f
parent9a263b43791fe0a44c0a8b35392a78793f19082c (diff)
feat(stream): remplace features type by feature type
-rw-r--r--lib/stream.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/stream.ml b/lib/stream.ml
index 2e39935..0b6763a 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -3,11 +3,10 @@ open Lwt.Infix
exception ClosedStream
-type features = {
- mechanisms : Sasl.auth_mechanism list;
- starttls : [`Required | `Optional | `None];
- unknown : Xml.element list;
- }
+type feature =
+ | Mechanisms of Sasl.auth_mechanism list
+ | STARTTLS of [`Required | `Optional]
+ | Other of Xml.element
(** [parse_features el] is a [features] record with all the features of the
[<stream:features>] stanza contained in [el]. *)