diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-26 16:59:26 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-26 21:40:53 +0200 |
commit | 3362a074c7dddf439ff878cf94d9169ab208eb10 (patch) | |
tree | c4b12cbc05b66e7ca2ccb57fcbafe06f3da82a19 /lib/sasl.ml | |
parent | bd254f33b81287f2c282b7ec5becd4f7c838549f (diff) |
refactor(xml): move get and next functions to Xml
Diffstat (limited to 'lib/sasl.ml')
-rw-r--r-- | lib/sasl.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sasl.ml b/lib/sasl.ml index 4404f74..ff6436a 100644 --- a/lib/sasl.ml +++ b/lib/sasl.ml @@ -53,7 +53,7 @@ let send_auth_stanza (stream, push) localpart pass mechanism = `Text [gen_auth mechanism]; `End_element] in Some (Markup.of_list stanza_list) |> push; - try get stream >|= parse_sasl_response + try Xml.get stream >|= parse_sasl_response with exn -> Lwt.fail exn let authenticate (portal : Portal.t) ({jid; password; preferred_mechanisms} : auth_config) = @@ -63,7 +63,7 @@ let authenticate (portal : Portal.t) ({jid; password; preferred_mechanisms} : au | [localpart; _domain] -> localpart | _ -> failwith "Invalid JID" in - let* {sasl_mechanisms; _} = Stream.get (fst portal) >|= Stream.parse_features + let* {sasl_mechanisms; _} = Xml.get (fst portal) >|= Stream.parse_features in let preferred, not_preferred = List.partition (fun f -> List.exists ((=) f) preferred_mechanisms) sasl_mechanisms in |