Changeset

4502:48afaec5d1de

mod_rest: Allow empty @to to mean to=account is in normal XMPP Noticed an XXX in snikket-web-portal wrt needing to explicitly set @to in order to talk to 'self' services in Prosody, where to=nil is the same as to=account
author Kim Alvefur <zash@zash.se>
date Sun, 07 Mar 2021 21:02:18 +0100
parents 4501:42f43f1383db
children 4503:80912726405d
files mod_rest/mod_rest.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua	Sun Mar 07 01:35:43 2021 +0100
+++ b/mod_rest/mod_rest.lua	Sun Mar 07 21:02:18 2021 +0100
@@ -241,7 +241,7 @@
 	end
 
 	local to = jid.prep(payload.attr.to);
-	if not to then
+	if payload.attr.to and not to then
 		return post_errors.new("to");
 	end