mod_rest: Fix replying to groupchat messages
Groupchat replies need to go back to the room instead of the
participants full JID
--- 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