aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-07-01 20:39:19 +0200
committerClombrong <cromblong@egregore.fun>2025-07-26 21:55:11 +0200
commitf9571f89a4121804ebe426e5458c4e32d779d98b (patch)
tree243a9c220ee14804baaf5412223f43924dfb2eca
parentb6abe9bfbe3d9fba58f3532e4323e340b0ae730b (diff)
fix(jid): take strings in of_string function
-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 '/'