Software /
code /
prosody-modules
Diff
mod_pastebin/mod_pastebin.lua @ 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 |
parent | 3044:be9e213d089b |
child | 3099:c88f91626e07 |
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));