# HG changeset patch # User Kim Alvefur # Date 1479577729 -3600 # Node ID 649f733aa3dc00daef328d32df79ece6b4451cc1 # Parent 02532f28b2078c369b7b40b728e2d43215efa973 mod_pubsub_feeds/feeds.lib: Fix converting RSS items to more than one Atom entry (thanks walduhu) diff -r 02532f28b207 -r 649f733aa3dc mod_pubsub_feeds/feeds.lib.lua --- a/mod_pubsub_feeds/feeds.lib.lua Sat Nov 19 17:43:26 2016 +0100 +++ b/mod_pubsub_feeds/feeds.lib.lua Sat Nov 19 18:48:49 2016 +0100 @@ -64,16 +64,16 @@ local feed = st.stanza("feed", { xmlns = "http://www.w3.org/2005/Atom" }); local channel = rss_feed:get_child("channel"); -- TODO channel properties - feed:tag("entry"); for item in channel:childtags("item") do + feed:tag("entry"); for tag in item:childtags() do local translator = rss2atom[tag.name]; if translator then translator(feed, tag); end end + feed:reset(); end - feed:reset(); return feed; end