From 1842a1fe0f21457d55c4479f2e3cb7a7b2c2b3e0 Mon Sep 17 00:00:00 2001 From: Clombrong Date: Sun, 29 Jun 2025 18:34:29 +0200 Subject: feat(stream): adapt to stream config type --- test/hello.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test') 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 -- cgit v1.2.3