diff options
Diffstat (limited to 'portal/lib/ws/portal.ml')
-rw-r--r-- | portal/lib/ws/portal.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/portal/lib/ws/portal.ml b/portal/lib/ws/portal.ml index e0c76b4..7b79166 100644 --- a/portal/lib/ws/portal.ml +++ b/portal/lib/ws/portal.ml @@ -1,6 +1,7 @@ open Lwt.Syntax open Lwt.Infix open Js_of_ocaml +open Markup let jss = Js.string let sjs = Js.to_string @@ -9,7 +10,7 @@ type t = string Lwt_stream.t * (string 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" -let stanza_open ?from domain = +let stanza_open ?from domain : (signal, sync) stream = (** [open_stanza domain] is an <open /> stanza for [domain]. If [from] is specified, the <open /> stanza has the from parameter. @@ -27,7 +28,7 @@ let stanza_open ?from domain = (("urn:ietf:params:xml:ns:xmpp-framing", "open"), attributes); `End_element] - in stanza |> of_list |> write_xml |> to_string + in stanza |> of_list let stanza_close = {|<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />|} |