aboutsummaryrefslogtreecommitdiff
path: root/portal/ws/portal.ml
diff options
context:
space:
mode:
Diffstat (limited to 'portal/ws/portal.ml')
-rw-r--r--portal/ws/portal.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/portal/ws/portal.ml b/portal/ws/portal.ml
index ad1eb86..d1e87e7 100644
--- a/portal/ws/portal.ml
+++ b/portal/ws/portal.ml
@@ -15,6 +15,8 @@ type t = {
let xmlns = "urn:ietf:params:xml:ns:xmpp-framing"
+exception MalformedStanza of Markup.Error.t
+
(* 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"
@@ -53,8 +55,6 @@ let header ?from domain {stream; push; _} =
(** [close] is a [<close/>] stanza. *)
let close = {|<close xmlns="|} ^ xmlns ^ {|" />|} |> string |> parse_xml |> signals
-exception MalformedStanza of Markup.location * Markup.Error.t
-
(** [ws_endpoint domain] is a promise containing the XMPP websocket endpoint
associated with [domain], by using the domain's Web-host Metadata.
@@ -131,8 +131,8 @@ let connect domain =
let open Markup_lwt in
(* When sending a malformed stanza (one that Markup.ml doesn't like), a
MalformedStanza exception is raised. *)
- let report loc err =
- raise (MalformedStanza (loc, err))
+ let report _ err =
+ raise (MalformedStanza err)
in
(* Consumes a stream of Markup.ml signals into a series of frames sent to the
WebSocket. *)