comparison plugins/mod_pep.lua @ 9141:c1368fb756bf

mod_pep: Pass 'recipients' table across module reloads
author Kim Alvefur <zash@zash.se>
date Mon, 06 Aug 2018 18:58:25 +0200
parents 415a6d26709e
children 85bc624b8685
comparison
equal deleted inserted replaced
9140:415a6d26709e 9141:c1368fb756bf
30 local known_nodes = module:open_store("pep"); 30 local known_nodes = module:open_store("pep");
31 31
32 local max_max_items = module:get_option_number("pep_max_items", 256); 32 local max_max_items = module:get_option_number("pep_max_items", 256);
33 33
34 function module.save() 34 function module.save()
35 return { services = services }; 35 return {
36 services = services;
37 recipients = recipients;
38 };
36 end 39 end
37 40
38 function module.restore(data) 41 function module.restore(data)
39 services = data.services; 42 services = data.services;
43 recipients = data.recipients;
40 end 44 end
41 45
42 function is_item_stanza(item) 46 function is_item_stanza(item)
43 return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item"; 47 return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item";
44 end 48 end