diff mod_rest/mod_rest.lua @ 4841:f69c5a443156

mod_rest: Fix nested message stanzas in XEP-0297 containers It's all a bit awkward because it doesn't normally use the whole schema directly, but rather checks which stanza type is used and picks out that property as a schema. Which also prevents references from working.
author Kim Alvefur <zash@zash.se>
date Wed, 29 Dec 2021 19:40:28 +0100
parents d29a295cd165
children dc7c9ae15f43
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua	Wed Dec 29 18:31:40 2021 +0100
+++ b/mod_rest/mod_rest.lua	Wed Dec 29 19:40:28 2021 +0100
@@ -297,7 +297,7 @@
 		return post_errors.new("parse", ctx);
 	end
 
-	if payload.attr.xmlns then
+	if (payload.attr.xmlns or "jabber:client") ~= "jabber:client" then
 		return post_errors.new("xmlns");
 	elseif payload.name ~= "message" and payload.name ~= "presence" and payload.name ~= "iq" then
 		return post_errors.new("name");