mod_pastebin: Restore URL in final body text
authorKim Alvefur <zash@zash.se>
Fri, 25 May 2018 00:18:46 +0200
changeset 3049 26977c4760f5
parent 3048 be9e213d089b
child 3050 d0db28768980
mod_pastebin: Restore URL in final body text
mod_pastebin/mod_pastebin.lua
--- a/mod_pastebin/mod_pastebin.lua	Fri May 25 00:12:12 2018 +0200
+++ b/mod_pastebin/mod_pastebin.lua	Fri May 25 00:18:46 2018 +0200
@@ -127,7 +127,7 @@
 		local summary = (body:sub(1, max_summary_length):gsub(utf8_pattern, drop_invalid_utf8) or ""):match("[^\n]+") or "";
 		summary = summary:match("^%s*(.-)%s*$");
 		local summary_prefixed = summary:match("[,:]$");
-		replace_tag(stanza, st.stanza("body"):text(summary));
+		replace_tag(stanza, st.stanza("body"):text(summary .. " " .. url));
 
 		stanza:add_child(st.stanza("query", { xmlns = "jabber:iq:oob" }):tag("url"):text(url));