summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-25 08:27:26 +0200
committerClombrong <cromblong@egregore.fun>2025-06-25 08:27:26 +0200
commitd9457c4b845d1027075e39f40a4dbf6d401eebaa (patch)
tree096434688f91277d4f413f0cb1e541e8530a845b /lib
parent0bcd2a720322802bbea31bc5112fa92a1e08ddbb (diff)
fix(sasl): use pattern matching for auth config
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sasl.ml b/lib/sasl.ml
index b4d4929..0cb6b3e 100644
--- a/lib/sasl.ml
+++ b/lib/sasl.ml
@@ -56,8 +56,7 @@ let send_auth_stanza (stream, push) localpart pass mechanism =
try get stream >|= parse_sasl_response
with exn -> Lwt.fail exn
-let authenticate (portal : Portal.t) (config : auth_config) =
- let {jid; password; preferred_mechanisms} = config in
+let authenticate (portal : Portal.t) ({jid; password; preferred_mechanisms} : auth_config) =
(* Probably not exactly compliant with https://xmpp.org/extensions/xep-0029.html,
but it's just for simplicity's sake in alpha. *)
let localpart = match String.split_on_char '@' jid with