diff mod_atom/mod_atom.lua @ 3274:2acfb45fd9ec

mod_atom: Expose title and description from node metadata in feed
author Kim Alvefur <zash@zash.se>
date Fri, 24 Aug 2018 23:00:08 +0200
parents 78888f4ec7e3
children 25b4cad8fee4
line wrap: on
line diff
--- a/mod_atom/mod_atom.lua	Fri Aug 24 22:59:24 2018 +0200
+++ b/mod_atom/mod_atom.lua	Fri Aug 24 23:00:08 2018 +0200
@@ -21,6 +21,8 @@
 				event.response.headers.content_type = "application/atom+xml";
 				local feed = st.stanza("feed", { xmlns = "http://www.w3.org/2005/Atom" })
 					:text_tag("generator", "Prosody", { uri = "xmpp:prosody.im", version = prosody.version })
+					:text_tag("title", pubsub_service.nodes["urn:xmpp:microblog:0"].config.title or "Microblog feed")
+					:text_tag("subtitle", pubsub_service.nodes["urn:xmpp:microblog:0"].config.description)
 					:tag("author")
 						:text_tag("name", user)
 						:text_tag("preferredUsername", user, { xmlns = "http://portablecontacts.net/spec/1.0" });