changeset 3346:03cbffd807bb

mod_pastebin: Convert limit values to strings (fixes traceback)
author Kim Alvefur <zash@zash.se>
date Wed, 03 Oct 2018 13:08:17 +0200
parents 4a12abccdbaf
children 823156d5885b
files mod_pastebin/mod_pastebin.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)