diff options
author | Clombrong <cromblong@egregore.fun> | 2025-07-01 20:39:19 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-07-26 21:55:11 +0200 |
commit | f9571f89a4121804ebe426e5458c4e32d779d98b (patch) | |
tree | 243a9c220ee14804baaf5412223f43924dfb2eca | |
parent | b6abe9bfbe3d9fba58f3532e4323e340b0ae730b (diff) |
fix(jid): take strings in of_string function
-rw-r--r-- | lib/jid.ml | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 '/' |