Mercurial > prosody-modules
changeset 4435:a620bf249e63
mod_pubsub_summary: Explain why it picks content or summary in a comment
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Feb 2021 16:04:17 +0100 (2021-02-10) |
parents | f10ab82be166 |
children | 07529dba102d |
files | mod_pubsub_summary/mod_pubsub_summary.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_summary/mod_pubsub_summary.lua Wed Feb 10 16:02:28 2021 +0100 +++ b/mod_pubsub_summary/mod_pubsub_summary.lua Wed Feb 10 16:04:17 2021 +0100 @@ -4,6 +4,8 @@ module:hook("pubsub-summary/http://www.w3.org/2005/Atom", function (event) local payload = event.payload; local title = payload:get_child_text("title"); + -- Note: This prefers content over summary, it was made for a news feed where + -- the interesting stuff was in the content and the summary was .. meh. local content_tag = payload:get_child("content") or payload:get_child("summary"); local content = content_tag:get_text(); if content_tag.attr.type == "html" then