diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-28 18:29:50 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-28 18:46:58 +0200 |
commit | 96b01e8304d30dd86969be9ad88638576af9db83 (patch) | |
tree | 2cd618978209a5f185cccfa5a476fd49cca8cb1a /portal/ws/portal.ml | |
parent | 9aeae3482c3de81b3bd13ca0e52f344b51fa7799 (diff) |
feat(portal): remove location in MalformedStanza
what were you gonna do with that information anyway?
Diffstat (limited to 'portal/ws/portal.ml')
-rw-r--r-- | portal/ws/portal.ml | 8 |
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. *) |