From f9571f89a4121804ebe426e5458c4e32d779d98b Mon Sep 17 00:00:00 2001 From: Clombrong Date: Tue, 1 Jul 2025 20:39:19 +0200 Subject: fix(jid): take strings in of_string function --- lib/jid.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 '/' -- cgit v1.2.3