Mercurial > prosody-hg
comparison plugins/mod_pep.lua @ 2823:b634741acbd0
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 |
| parents | 3b7473a3fa44 |
| children | 5839f303addf |
comparison
equal
deleted
inserted
replaced
| 2822:511dfd88e14c | 2823:b634741acbd0 |
|---|---|
| 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}) |
