Mercurial > prosody-modules
comparison mod_atom/mod_atom.lua @ 3275:25b4cad8fee4
mod_atom: Include User Nickname (if configured to be public)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 24 Aug 2018 22:52:13 +0200 |
| parents | 2acfb45fd9ec |
| children | cb4b26221cf6 |
comparison
equal
deleted
inserted
replaced
| 3274:2acfb45fd9ec | 3275:25b4cad8fee4 |
|---|---|
| 24 :text_tag("title", pubsub_service.nodes["urn:xmpp:microblog:0"].config.title or "Microblog feed") | 24 :text_tag("title", pubsub_service.nodes["urn:xmpp:microblog:0"].config.title or "Microblog feed") |
| 25 :text_tag("subtitle", pubsub_service.nodes["urn:xmpp:microblog:0"].config.description) | 25 :text_tag("subtitle", pubsub_service.nodes["urn:xmpp:microblog:0"].config.description) |
| 26 :tag("author") | 26 :tag("author") |
| 27 :text_tag("name", user) | 27 :text_tag("name", user) |
| 28 :text_tag("preferredUsername", user, { xmlns = "http://portablecontacts.net/spec/1.0" }); | 28 :text_tag("preferredUsername", user, { xmlns = "http://portablecontacts.net/spec/1.0" }); |
| 29 local ok, _, nick = pubsub_service:get_last_item("http://jabber.org/protocol/nick", actor); | |
| 30 if ok and nick then | |
| 31 feed:text_tag("displayName", nick.tags[1][1], { xmlns = "http://portablecontacts.net/spec/1.0" }); | |
| 32 end | |
| 29 | 33 |
| 30 feed:reset(); | 34 feed:reset(); |
| 31 | 35 |
| 32 for i = #items, 1, -1 do | 36 for i = #items, 1, -1 do |
| 33 feed:add_direct_child(items[items[i]].tags[1]); | 37 feed:add_direct_child(items[items[i]].tags[1]); |
