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
This commit is contained in:
Goffi 2026-06-08 10:38:35 +02:00
commit 67eea35d4e

View file

@ -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: