From 67eea35d4e0f164575ee864059793c5fd421a6bc Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 8 Jun 2026 10:38:35 +0200 Subject: [PATCH] plugin XEP-0115: use the new `raw_values` from Tx-XMPP: Libervia calls Tx-XMPP `typeCheck` on disco info reception to check and normalize values. In the case of XEP-0115 this cause trouve as the normalization is lossy, and change the type of some fields (booleans, JIDs). The new `raw_values` property has been added in Tx-XMPP v0.15 to retrieve original `str` value, so this now used to build the hash. fix 486 --- libervia/backend/plugins/plugin_xep_0115.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libervia/backend/plugins/plugin_xep_0115.py b/libervia/backend/plugins/plugin_xep_0115.py index 69cefafc..a17add42 100644 --- a/libervia/backend/plugins/plugin_xep_0115.py +++ b/libervia/backend/plugins/plugin_xep_0115.py @@ -346,8 +346,8 @@ class XEP_0115: # Step 7.c.a: append var attribute followed by '<' s.append(field.var.encode("utf-8")) s.append(b"<") - # Step 7.c.b: sort values - values = [v.encode("utf-8") for v in field.values] + # Step 7.c.b: sort values (use raw XML character data per spec) + values = [v.encode("utf-8") for v in field.raw_values] values.sort() # Step 7.c.c: append each value followed by '<' for value in values: