Software /
code /
prosody
Comparison
plugins/mod_pep.lua @ 2326:814eaba0c777
mod_pep: Allow storage of urn:xmpp:avatar:data node (payload only with base64 data)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 05 Dec 2009 09:43:53 -0800 |
parent | 2045:3b7473a3fa44 |
child | 2327:5839f303addf |
comparison
equal
deleted
inserted
replaced
2325:265441f2ad48 | 2326:814eaba0c777 |
---|---|
37 module:add_identity("pubsub", "pep", "Prosody"); | 37 module:add_identity("pubsub", "pep", "Prosody"); |
38 module:add_feature("http://jabber.org/protocol/pubsub#publish"); | 38 module:add_feature("http://jabber.org/protocol/pubsub#publish"); |
39 | 39 |
40 local function publish(session, node, item) | 40 local function publish(session, node, item) |
41 item.attr.xmlns = nil; | 41 item.attr.xmlns = nil; |
42 local disable = #item.tags ~= 1 or #item.tags[1].tags == 0; | 42 local disable = #item.tags ~= 1 or #item.tags[1] == 0; |
43 if #item.tags == 0 then item.name = "retract"; end | 43 if #item.tags == 0 then item.name = "retract"; end |
44 local bare = session.username..'@'..session.host; | 44 local bare = session.username..'@'..session.host; |
45 local stanza = st.message({from=bare, type='headline'}) | 45 local stanza = st.message({from=bare, type='headline'}) |
46 :tag('event', {xmlns='http://jabber.org/protocol/pubsub#event'}) | 46 :tag('event', {xmlns='http://jabber.org/protocol/pubsub#event'}) |
47 :tag('items', {node=node}) | 47 :tag('items', {node=node}) |