Mercurial > prosody-modules
changeset 3519:ac623080324a
mod_pubsub_github: Only put first line of commit message in title, rest in content
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 31 Mar 2019 18:16:49 +0200 |
parents | 95c1c3e057cf |
children | 37e89a76c7d7 |
files | mod_pubsub_github/mod_pubsub_github.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 18:14:59 2019 +0200 +++ b/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 18:16:49 2019 +0200 @@ -49,7 +49,8 @@ st.stanza("item", { id = commit.id, xmlns = "http://jabber.org/protocol/pubsub" }) :tag("entry", { xmlns = "http://www.w3.org/2005/Atom" }) :tag("id"):text(commit.id):up() - :tag("title"):text(commit.message):up() + :tag("title"):text(commit.message:match("^[^\r\n]*")):up() + :tag("content"):text(commit.message):up() :tag("link", { rel = "alternate", href = commit.url }):up() :tag("published"):text(commit.author.date):up() :tag("author")