Software /
code /
prosody-modules
Changeset
4427:c402b273f2e3
mod_pubsub_feeds: Copy Atom tags from RSS as-is
I've seen some RSS feeds that use Atom elements.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Feb 2021 16:16:29 -0001 |
parents | 4426:3fe2c264aac4 |
children | 4428:b328ca621ba6 |
files | mod_pubsub_feeds/feeds.lib.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_feeds/feeds.lib.lua Thu Feb 04 01:12:41 2021 +0100 +++ b/mod_pubsub_feeds/feeds.lib.lua Thu Feb 04 16:16:29 2021 -0001 @@ -72,6 +72,10 @@ translator(feed, tag); end end + -- Preserve Atom-namespaced items + for atomtag in item:childtags(nil, "http://www.w3.org/2005/Atom") do + feed:add_child(st.clone(atomtag)); + end feed:reset(); end return feed;