Mercurial > prosody-modules
changeset 3821:11272a3233ce
mod_rest: Fix replying to groupchat messages
Groupchat replies need to go back to the room instead of the
participants full JID
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Jan 2020 18:41:04 +0100 |
parents | d3757e089433 |
children | f0a1d113dce4 |
files | mod_rest/mod_rest.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua Wed Jan 01 18:11:55 2020 +0100 +++ b/mod_rest/mod_rest.lua Wed Jan 01 18:41:04 2020 +0100 @@ -220,6 +220,9 @@ type = parsed.attr.type, ["xml:lang"] = parsed.attr["xml:lang"], }; + if parsed.name == "message" and parsed.attr.type == "groupchat" then + parsed.attr.to = jid.bare(stanza.attr.from); + end if parsed.name == "iq" or parsed.attr.type == "error" then parsed.attr.id = stanza.attr.id; end