diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-29 21:06:26 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-29 21:06:26 +0200 |
commit | 20f32bd13a8f79e123dd31d79fc119e99eb4334f (patch) | |
tree | 400a94ae06b00ca9da054f715717b7555d8a4520 | |
parent | a70e59463f743830f64f743f8b6c081794b4eaaf (diff) |
style(starttls): rename prefer_starttls to prefer
-rw-r--r-- | lib/starttls.ml | 4 | ||||
-rw-r--r-- | lib/stream.ml | 2 | ||||
-rw-r--r-- | test/hello.ml | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/starttls.ml b/lib/starttls.ml index 9d09e3e..7a74b11 100644 --- a/lib/starttls.ml +++ b/lib/starttls.ml @@ -4,9 +4,9 @@ open Xml (** This type is used to configure the STARTTLS handshake during the stream negotiation. When the XMPP server advertises optional STARTTLS support, whether the connection - will be upgraded to STARTTLS depends on [prefer_starttls]. *) + will be upgraded to STARTTLS depends on [prefer]. *) type config = { - prefer_starttls : bool + prefer: bool } exception TLSError diff --git a/lib/stream.ml b/lib/stream.ml index 451f9b5..e2fe707 100644 --- a/lib/stream.ml +++ b/lib/stream.ml @@ -98,7 +98,7 @@ let negotiate feature portal {starttls; sasl; _} : unit Lwt.t = in match feature with | Mandatory STARTTLS -> Starttls.upgrade portal - | Optional STARTTLS -> if starttls.prefer_starttls + | Optional STARTTLS -> if starttls.prefer then Starttls.upgrade portal else Lwt.return_unit | f -> unwrap f |> indifferent diff --git a/test/hello.ml b/test/hello.ml index 51468dd..6636d4d 100644 --- a/test/hello.ml +++ b/test/hello.ml @@ -4,7 +4,7 @@ open! Flesh let main = let config : Stream.config = { - starttls = {prefer_starttls = true}; + starttls = {prefer = true}; sasl = { jid = (Sys.getenv "FLESH_JID"); password = (Sys.getenv "FLESH_PASSWORD"); |