# HG changeset patch # User Kim Alvefur # Date 1526856867 -7200 # Node ID 6e9096b66704ca570c701c3c12bf0e9877e291fa # Parent b2b129f699edcbfef3f08684247510e8708ffb61 mod_pastebin: Add an OOB tag pointing to the pastebin URL diff -r b2b129f699ed -r 6e9096b66704 mod_pastebin/mod_pastebin.lua --- a/mod_pastebin/mod_pastebin.lua Sun May 20 18:11:15 2018 +0200 +++ b/mod_pastebin/mod_pastebin.lua Mon May 21 00:54:27 2018 +0200 @@ -123,6 +123,8 @@ local summary_prefixed = summary:match("[,:]$"); replace_tag(stanza, st.stanza("body"):text(summary)); + stanza:add_child(st.stanza("query", { xmlns = "jabber:iq:oob" }):tag("url"):text(url)); + if html_preview then local line_count = select(2, body:gsub("\n", "%0")) + 1; local link_text = ("[view %spaste (%d line%s)]"):format(summary_prefixed and "" or "rest of ", line_count, line_count == 1 and "" or "s");