aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/jid.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/jid.ml b/lib/jid.ml
index ec24a30..ee74148 100644
--- a/lib/jid.ml
+++ b/lib/jid.ml
@@ -29,8 +29,9 @@ let string_of_uchars (u : uchars) =
List.iter (Buffer.add_utf_8_uchar buf) u;
Buffer.to_bytes buf |> String.of_bytes
-let of_string (jid : uchars) : t =
+let of_string (s : string) : t =
let open List in
+ let jid = uchars_of_string s in
let dend, resourcepart =
find_mapi (fun i c ->
if c = Uchar.of_char '/'