diff options
author | Clombrong <cromblong@egregore.fun> | 2025-08-17 16:44:45 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-08-17 16:48:22 +0200 |
commit | bd7533186094ffdf9b1bd9908f603807472eacb5 (patch) | |
tree | 27a08edac156160b7b5a9ecdfaa52b38bad8e1c7 | |
parent | 36f019c5ee40d712e7ab2da5b0bfbc30f45bff2b (diff) |
refactor(portal-ws): move down close stanza
-rw-r--r-- | portal/ws/portal.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/portal/ws/portal.ml b/portal/ws/portal.ml index 33e5743..3b15fbc 100644 --- a/portal/ws/portal.ml +++ b/portal/ws/portal.ml @@ -68,9 +68,6 @@ let header ?from {domain; stream; push; _} = | Some id -> Lwt.return id | None -> Lwt.fail_with "Invalid stream opening server-side." -(** [close] is a [<close/>] stanza. *) -let close = {|<close xmlns="|} ^ xmlns ^ {|" />|} |> string |> parse_xml |> signals - (** [ws_endpoint domain] is a promise containing the XMPP websocket endpoint associated with [domain], by using the domain's Web-host Metadata. @@ -127,6 +124,9 @@ let connect (domain : domain) : socket Lwt.t = let+ () = wait is_open in {domain; stream; push} in ws_endpoint domain >>= ws_stream +(** [close] is a [<close/>] stanza. *) +let close = {|<close xmlns="|} ^ xmlns ^ {|" />|} |> string |> parse_xml |> signals + (** [portal_of_socket] is a Portal communicating with the socket [socket] via the Websocket subprotocol. |