Software /
code /
prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 8221:4989a625419a
mod_pubsub: Comment out data persistence for now (weird without config persistence)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 13 Sep 2017 18:46:39 +0200 |
parent | 8218:2c75a5ba58fc |
child | 8311:df8c82d285dc |
comparison
equal
deleted
inserted
replaced
8220:a1b0fa38fca7 | 8221:4989a625419a |
---|---|
19 | 19 |
20 module:depends("disco"); | 20 module:depends("disco"); |
21 module:add_identity("pubsub", "service", pubsub_disco_name); | 21 module:add_identity("pubsub", "service", pubsub_disco_name); |
22 module:add_feature("http://jabber.org/protocol/pubsub"); | 22 module:add_feature("http://jabber.org/protocol/pubsub"); |
23 | 23 |
24 --[[ TODO Disabled until config persistence is implemented | |
24 local archive = module:open_store("pubsub", "archive"); | 25 local archive = module:open_store("pubsub", "archive"); |
26 --]] | |
25 | 27 |
26 function handle_pubsub_iq(event) | 28 function handle_pubsub_iq(event) |
27 local origin, stanza = event.origin, event.stanza; | 29 local origin, stanza = event.origin, event.stanza; |
28 local pubsub_tag = stanza.tags[1]; | 30 local pubsub_tag = stanza.tags[1]; |
29 local action = pubsub_tag.tags[1]; | 31 local action = pubsub_tag.tags[1]; |
36 handler(origin, stanza, action, service); | 38 handler(origin, stanza, action, service); |
37 return true; | 39 return true; |
38 end | 40 end |
39 end | 41 end |
40 | 42 |
43 --[[ TODO Disabled until config persistence is implemented | |
41 local function simple_itemstore(config, node) | 44 local function simple_itemstore(config, node) |
42 return lib_pubsub.simple_itemstore(archive, config, nil, node, expose_publisher); | 45 return lib_pubsub.simple_itemstore(archive, config, nil, node, expose_publisher); |
43 end | 46 end |
47 --]] | |
44 | 48 |
45 function simple_broadcast(kind, node, jids, item, actor) | 49 function simple_broadcast(kind, node, jids, item, actor) |
46 if item then | 50 if item then |
47 item = st.clone(item); | 51 item = st.clone(item); |
48 item.attr.xmlns = nil; -- Clear the pubsub namespace | 52 item.attr.xmlns = nil; -- Clear the pubsub namespace |
228 }; | 232 }; |
229 | 233 |
230 autocreate_on_publish = autocreate_on_publish; | 234 autocreate_on_publish = autocreate_on_publish; |
231 autocreate_on_subscribe = autocreate_on_subscribe; | 235 autocreate_on_subscribe = autocreate_on_subscribe; |
232 | 236 |
237 --[[ TODO Disabled until config persistence is implemented | |
233 itemstore = simple_itemstore; | 238 itemstore = simple_itemstore; |
239 --]] | |
234 broadcaster = simple_broadcast; | 240 broadcaster = simple_broadcast; |
235 get_affiliation = get_affiliation; | 241 get_affiliation = get_affiliation; |
236 | 242 |
237 normalize_jid = jid_bare; | 243 normalize_jid = jid_bare; |
238 })); | 244 })); |