# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1535144328 -7200
# Node ID 119e22ccd64aa429eba8a06913ed49b2fc829f15
# Parent  7504f765e767bcb0c177007bf465a2f4bf9f5341
mod_atom: Add some basic metadata to feed

diff -r 7504f765e767 -r 119e22ccd64a mod_atom/mod_atom.lua
--- a/mod_atom/mod_atom.lua	Fri Aug 24 21:36:58 2018 +0200
+++ b/mod_atom/mod_atom.lua	Fri Aug 24 22:58:48 2018 +0200
@@ -19,7 +19,13 @@
 			local ok, items = pubsub_service:get_items("urn:xmpp:microblog:0", actor);
 			if ok then
 				event.response.headers.content_type = "application/atom+xml";
-				local feed = st.stanza("feed", { xmlns = "http://www.w3.org/2005/Atom" });
+				local feed = st.stanza("feed", { xmlns = "http://www.w3.org/2005/Atom" })
+					:text_tag("generator", "Prosody", { uri = "xmpp:prosody.im", version = prosody.version })
+					:tag("author")
+						:text_tag("name", user)
+
+				feed:reset();
+
 				for i = #items, 1, -1 do
 					feed:add_direct_child(items[items[i]].tags[1]);
 				end