aboutsummaryrefslogtreecommitdiff
path: root/portal
diff options
context:
space:
mode:
Diffstat (limited to 'portal')
-rw-r--r--portal/portal.mli2
-rw-r--r--portal/tcp/portal.ml4
-rw-r--r--portal/ws/portal.ml2
3 files changed, 4 insertions, 4 deletions
diff --git a/portal/portal.mli b/portal/portal.mli
index 52a96ce..b8657ee 100644
--- a/portal/portal.mli
+++ b/portal/portal.mli
@@ -44,7 +44,7 @@ val starttls : t -> unit Lwt.t
the response stream header.
When [from] is specified, a from attribute is included. *)
-val header : ?from:string -> domain -> t -> string Lwt.t
+val header : ?from:string -> t -> string Lwt.t
(** [_encrypted socket] returns whether [socket] is encrypted, using TLS or otherwise. *)
val _encrypted : socket -> bool
diff --git a/portal/tcp/portal.ml b/portal/tcp/portal.ml
index b776efc..33e4971 100644
--- a/portal/tcp/portal.ml
+++ b/portal/tcp/portal.ml
@@ -199,10 +199,10 @@ let _encrypted = function
| Plain _ -> false
| Tls _ -> true
-let header ?from domain (portal : t) =
+let header ?from (portal : t) =
let stanza =
let attributes =
- [(("", "to"), domain); (("", "version"), "1.0");
+ [(("", "to"), portal.domain); (("", "version"), "1.0");
(("http://www.w3.org/XML/1998/namespace", "lang"), "en");
(("http://www.w3.org/2000/xmlns/", "xmlns"), "jabber:client");
(("http://www.w3.org/2000/xmlns/", "stream"), xmlns)]
diff --git a/portal/ws/portal.ml b/portal/ws/portal.ml
index 636cb89..8d490cc 100644
--- a/portal/ws/portal.ml
+++ b/portal/ws/portal.ml
@@ -31,7 +31,7 @@ let well_known_of (domain : string) = "https://" ^ domain ^ "/.well-known/host-m
(** [open_stanza domain] is an <open /> stanza for [domain].
If [from] is specified, the <open /> stanza has the from parameter. *)
-let header ?from domain {stream; push; _} =
+let header ?from {domain; stream; push; _} =
let stanza =
let attributes =
let open Option in