mod_pastebin: Convert limit values to strings (fixes traceback)
authorKim Alvefur <zash@zash.se>
Wed, 03 Oct 2018 13:08:17 +0200
changeset 3350 03cbffd807bb
parent 3349 4a12abccdbaf
child 3351 823156d5885b
mod_pastebin: Convert limit values to strings (fixes traceback)
mod_pastebin/mod_pastebin.lua
--- a/mod_pastebin/mod_pastebin.lua	Wed Oct 03 12:59:04 2018 +0200
+++ b/mod_pastebin/mod_pastebin.lua	Wed Oct 03 13:08:17 2018 +0200
@@ -157,8 +157,8 @@
 	reply:tag("feature", { var = "https://modules.prosody.im/mod_pastebin" }):up();
 	table.insert(form, { name = "https://modules.prosody.im/mod_pastebin#max_lines", datatype = "xs:integer" });
 	table.insert(form, { name = "https://modules.prosody.im/mod_pastebin#max_characters", datatype = "xs:integer" });
-	formdata["https://modules.prosody.im/mod_pastebin#max_lines"] = line_threshold;
-	formdata["https://modules.prosody.im/mod_pastebin#max_characters"] = length_threshold;
+	formdata["https://modules.prosody.im/mod_pastebin#max_lines"] = tostring(line_threshold);
+	formdata["https://modules.prosody.im/mod_pastebin#max_characters"] = tostring(length_threshold);
 end);
 
 function expire_pastes(time)