changeset 4867:9d29467f4d5b

mod_http_xep227: Fix luacheck warnings
author Matthew Wild <mwild1@gmail.com>
date Sat, 15 Jan 2022 13:46:34 +0000 (2022-01-15)
parents a1181413a0eb
children 57311c545013
files mod_http_xep227/mod_http_xep227.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_xep227/mod_http_xep227.lua	Sat Jan 15 00:38:32 2022 +0100
+++ b/mod_http_xep227/mod_http_xep227.lua	Sat Jan 15 13:46:34 2022 +0000
@@ -72,7 +72,7 @@
 		store_name = "pep_data";
 	end
 	-- Return driver
-	return sm.get_driver(session.host, driver_store_name);
+	return sm.get_driver(host, store_name);
 end
 
 local function handle_export_227(event)
@@ -147,7 +147,7 @@
 		return false;
 	end
 	-- Looks like 227, but check it has at least one host + user element
-	return not not input_xml_parsed:find("host/user");
+	return not not xml_data:find("host/user");
 end
 
 local function handle_import_227(event)
@@ -158,7 +158,7 @@
 	local input_xml_parsed = xml.parse(input_xml_raw);
 
 	-- Some sanity checks
-	if not input_xml_parsed or not is_looking_like_227(input_xml_parsed) then
+	if not input_xml_parsed or not is_looking_like_xep227(input_xml_parsed) then
 		module:log("warn", "No data to import");
 		return 422;
 	end