equal
deleted
inserted
replaced
23 module:add_feature("http://jabber.org/protocol/pubsub"); |
23 module:add_feature("http://jabber.org/protocol/pubsub"); |
24 |
24 |
25 function handle_pubsub_iq(event) |
25 function handle_pubsub_iq(event) |
26 return lib_pubsub.handle_pubsub_iq(event, service); |
26 return lib_pubsub.handle_pubsub_iq(event, service); |
27 end |
27 end |
|
28 |
|
29 local node_store = module:open_store(module.name.."_nodes"); |
28 |
30 |
29 local function create_simple_itemstore(node_config, node_name) |
31 local function create_simple_itemstore(node_config, node_name) |
30 local archive = module:open_store("pubsub_"..node_name, "archive"); |
32 local archive = module:open_store("pubsub_"..node_name, "archive"); |
31 return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name); |
33 return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name); |
32 end |
34 end |
200 }; |
202 }; |
201 |
203 |
202 autocreate_on_publish = autocreate_on_publish; |
204 autocreate_on_publish = autocreate_on_publish; |
203 autocreate_on_subscribe = autocreate_on_subscribe; |
205 autocreate_on_subscribe = autocreate_on_subscribe; |
204 |
206 |
|
207 nodestore = node_store; |
205 itemstore = create_simple_itemstore; |
208 itemstore = create_simple_itemstore; |
206 broadcaster = simple_broadcast; |
209 broadcaster = simple_broadcast; |
207 get_affiliation = get_affiliation; |
210 get_affiliation = get_affiliation; |
208 |
211 |
209 normalize_jid = jid_bare; |
212 normalize_jid = jid_bare; |