diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-18 00:54:23 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-18 00:54:23 +0200 |
commit | f7dc0efb3581c259f6c5f18662bbdb0d336bbd0e (patch) | |
tree | a29ca7d0811ee66530b6d2738fcbbc34386560e1 /portal/lib/ws | |
parent | 8839d911afb6404033d640845295539fb63fcdb2 (diff) |
fix(portal): accept parsing streams instead of pure signals
Diffstat (limited to 'portal/lib/ws')
-rw-r--r-- | portal/lib/ws/portal.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/portal/lib/ws/portal.ml b/portal/lib/ws/portal.ml index 1bffb6d..7ca70db 100644 --- a/portal/lib/ws/portal.ml +++ b/portal/lib/ws/portal.ml @@ -5,7 +5,7 @@ open Markup let jss = Js.string let sjs = Js.to_string -type t = async parser * (signal option -> unit) +type t = async parser * ((signal, sync) stream option -> unit) (* sic. XEP-0156: "host-meta files MUST be fetched only over HTTPS". I don't make the rules. *) let well_known_of (domain : string) = "https://" ^ domain ^ "/.well-known/host-meta" @@ -134,5 +134,5 @@ let connect domain = (0, []) |> Markup_lwt.to_lwt_stream in let+ _ = Lwt_stream.iter (fun x -> ws_push (Some x)) stanzas in ws_push None - in Lwt.async @@ (fun () -> mu_stream |> Markup_lwt.lwt_stream |> to_frames); + in Lwt.async @@ (fun () -> Markup_lwt.(mu_stream |> lwt_stream |> iter to_frames)); ws_stream |> lwt_stream |> strings_to_bytes |> parse_xml ~report, mu_push |