changeset 4222:1c30d574df2b

plugin XEP-0313: fix value used in `msg_from` when `from` is not explicitely specified.
author Goffi <goffi@goffi.org>
date Tue, 05 Mar 2024 17:31:56 +0100
parents 2b000790b197
children 919bdf7768d8
files libervia/backend/plugins/plugin_xep_0313.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0313.py	Tue Mar 05 17:31:56 2024 +0100
+++ b/libervia/backend/plugins/plugin_xep_0313.py	Tue Mar 05 17:31:56 2024 +0100
@@ -268,7 +268,7 @@
                 xml=mess_elt.toXml()))
             raise exceptions.DataError("Invalid element")
         service_jid = client.jid.userhostJID() if service is None else service
-        mess_from = mess_elt.getAttribute("from") or client.jid.userhostJID()
+        mess_from = mess_elt.getAttribute("from") or client.jid.userhost()
         # we check that the message has been sent by the right service
         # if service is None (i.e. message expected from our own server)
         # from can be server jid or user's bare jid