# HG changeset patch # User Kim Alvefur # Date 1577900464 -3600 # Node ID 11272a3233ce2c99de302fbbeb80d9ce0b4e7e29 # Parent d3757e089433a97427a14c705ee70d0a644b5c4f mod_rest: Fix replying to groupchat messages Groupchat replies need to go back to the room instead of the participants full JID diff -r d3757e089433 -r 11272a3233ce mod_rest/mod_rest.lua --- 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