Mercurial > prosody-hg
comparison plugins/mod_pep.lua @ 6864:0129ffcaa7ab
mod_pep: Document data structures, so I don't have to spend time remembering every time I work on this module
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 04 Sep 2015 11:26:51 +0100 |
| parents | bb27ba619932 |
| children | 20b0f0b48655 |
comparison
equal
deleted
inserted
replaced
| 6863:88d54bec26b7 | 6864:0129ffcaa7ab |
|---|---|
| 15 local next = next; | 15 local next = next; |
| 16 local type = type; | 16 local type = type; |
| 17 local calculate_hash = require "util.caps".calculate_hash; | 17 local calculate_hash = require "util.caps".calculate_hash; |
| 18 local core_post_stanza = prosody.core_post_stanza; | 18 local core_post_stanza = prosody.core_post_stanza; |
| 19 | 19 |
| 20 -- Used as canonical 'empty table' | |
| 20 local NULL = {}; | 21 local NULL = {}; |
| 22 -- data[user_bare_jid][node] = item_stanza | |
| 21 local data = {}; | 23 local data = {}; |
| 24 --- recipients[user_bare_jid][contact_full_jid][subscribed_node] = true | |
| 22 local recipients = {}; | 25 local recipients = {}; |
| 26 -- hash_map[hash][subscribed_nodes] = true | |
| 23 local hash_map = {}; | 27 local hash_map = {}; |
| 24 | 28 |
| 25 module.save = function() | 29 module.save = function() |
| 26 return { data = data, recipients = recipients, hash_map = hash_map }; | 30 return { data = data, recipients = recipients, hash_map = hash_map }; |
| 27 end | 31 end |
