Software / code / prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 8503:3b86134c56ea
mod_pubsub: Some variable renames for clarity
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 02 Feb 2018 19:35:02 +0000 |
| parent | 8340:7c1fb8c042dc |
| child | 8504:80b8355c8b8b |
comparison
equal
deleted
inserted
replaced
| 8502:6c2c2fc4b8dd | 8503:3b86134c56ea |
|---|---|
| 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 | 28 |
| 29 local function simple_itemstore(config, node) | 29 local function create_simple_itemstore(node_config, node_name) |
| 30 local archive = module:open_store("pubsub_"..node, "archive"); | 30 local archive = module:open_store("pubsub_"..node_name, "archive"); |
| 31 return lib_pubsub.archive_itemstore(archive, config, nil, node); | 31 return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name); |
| 32 end | 32 end |
| 33 | 33 |
| 34 if enable_persistence then | 34 if enable_persistence then |
| 35 module:log("warn", "Item persistence is an experimental feature. Note that ownership information is lost on restart.") | 35 module:log("warn", "Item persistence is an experimental feature. Note that ownership information is lost on restart.") |
| 36 else | 36 else |
| 37 simple_itemstore = nil; | 37 create_simple_itemstore = nil; |
| 38 end | 38 end |
| 39 | 39 |
| 40 | 40 |
| 41 function simple_broadcast(kind, node, jids, item, actor) | 41 function simple_broadcast(kind, node, jids, item, actor) |
| 42 if item then | 42 if item then |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 autocreate_on_publish = autocreate_on_publish; | 202 autocreate_on_publish = autocreate_on_publish; |
| 203 autocreate_on_subscribe = autocreate_on_subscribe; | 203 autocreate_on_subscribe = autocreate_on_subscribe; |
| 204 | 204 |
| 205 itemstore = simple_itemstore; | 205 itemstore = create_simple_itemstore; |
| 206 broadcaster = simple_broadcast; | 206 broadcaster = simple_broadcast; |
| 207 get_affiliation = get_affiliation; | 207 get_affiliation = get_affiliation; |
| 208 | 208 |
| 209 normalize_jid = jid_bare; | 209 normalize_jid = jid_bare; |
| 210 })); | 210 })); |