Changeset

3045:26977c4760f5

mod_pastebin: Restore URL in final body text
author Kim Alvefur <zash@zash.se>
date Fri, 25 May 2018 00:18:46 +0200
parents 3044:be9e213d089b
children 3046:d0db28768980
files mod_pastebin/mod_pastebin.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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));