diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-25 08:27:26 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-25 08:27:26 +0200 |
commit | d9457c4b845d1027075e39f40a4dbf6d401eebaa (patch) | |
tree | 096434688f91277d4f413f0cb1e541e8530a845b | |
parent | 0bcd2a720322802bbea31bc5112fa92a1e08ddbb (diff) |
fix(sasl): use pattern matching for auth config
-rw-r--r-- | lib/sasl.ml | 3 |
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 |