diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-29 18:34:29 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-29 18:34:29 +0200 |
commit | 1842a1fe0f21457d55c4479f2e3cb7a7b2c2b3e0 (patch) | |
tree | d4df1855880d91d66e8869c8c19892e5976c139e /test | |
parent | ee4169faf487e0d4d75738fdddb34cc1767719f9 (diff) |
feat(stream): adapt to stream config type
Diffstat (limited to 'test')
-rw-r--r-- | test/hello.ml | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/hello.ml b/test/hello.ml index 097e750..e506ded 100644 --- a/test/hello.ml +++ b/test/hello.ml @@ -3,12 +3,16 @@ open! Lwt.Infix open! Flesh let main = - let config : Sasl.config = { - jid = (Sys.getenv "FLESH_JID"); - password = (Sys.getenv "FLESH_PASSWORD"); - preferred_mechanisms = [Sasl.PLAIN] + let config : Stream.config = { + starttls = {prefer_starttls = true}; + sasl = { + jid = (Sys.getenv "FLESH_JID"); + password = (Sys.getenv "FLESH_PASSWORD"); + preferred_mechanisms = [Sasl.PLAIN] + }; + other = []; } - in let domain = (List.nth (String.split_on_char '@' config.jid) 1) in + in let domain = (List.nth (String.split_on_char '@' config.sasl.jid) 1) in try%lwt Stream.initiate domain config >|= (fun (portal, _) -> portal.push None) with exn -> begin |