Software /
code /
prosody
Comparison
util/pubsub.lua @ 9158:37e814a680ab
mod_pubsub, mod_pep, util.pubsub: Move capability definitions into util.pubsub to avoid duplication
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 08 Aug 2018 20:48:02 +0100 |
parent | 9144:b40efef8ec99 |
child | 9160:e13a1a0b0107 |
comparison
equal
deleted
inserted
replaced
9157:c517a219f2ac | 9158:37e814a680ab |
---|---|
7 itemstore = function (config, _) return cache.new(config["max_items"]) end; | 7 itemstore = function (config, _) return cache.new(config["max_items"]) end; |
8 broadcaster = function () end; | 8 broadcaster = function () end; |
9 itemcheck = function () return true; end; | 9 itemcheck = function () return true; end; |
10 get_affiliation = function () end; | 10 get_affiliation = function () end; |
11 normalize_jid = function (jid) return jid; end; | 11 normalize_jid = function (jid) return jid; end; |
12 capabilities = {}; | 12 capabilities = { |
13 restricted = { | |
14 be_subscribed = false; | |
15 be_unsubscribed = true; | |
16 }; | |
17 none = { | |
18 create = false; | |
19 publish = false; | |
20 retract = false; | |
21 get_nodes = true; | |
22 | |
23 subscribe = true; | |
24 unsubscribe = true; | |
25 get_subscription = true; | |
26 get_subscriptions = true; | |
27 get_items = true; | |
28 | |
29 subscribe_other = false; | |
30 unsubscribe_other = false; | |
31 get_subscription_other = false; | |
32 get_subscriptions_other = false; | |
33 | |
34 be_subscribed = true; | |
35 be_unsubscribed = true; | |
36 | |
37 set_affiliation = false; | |
38 }; | |
39 publisher = { | |
40 create = false; | |
41 publish = true; | |
42 retract = true; | |
43 get_nodes = true; | |
44 get_configuration = true; | |
45 | |
46 subscribe = true; | |
47 unsubscribe = true; | |
48 get_subscription = true; | |
49 get_subscriptions = true; | |
50 get_items = true; | |
51 | |
52 subscribe_other = false; | |
53 unsubscribe_other = false; | |
54 get_subscription_other = false; | |
55 get_subscriptions_other = false; | |
56 | |
57 be_subscribed = true; | |
58 be_unsubscribed = true; | |
59 | |
60 set_affiliation = false; | |
61 }; | |
62 owner = { | |
63 create = true; | |
64 publish = true; | |
65 retract = true; | |
66 delete = true; | |
67 get_nodes = true; | |
68 configure = true; | |
69 get_configuration = true; | |
70 | |
71 subscribe = true; | |
72 unsubscribe = true; | |
73 get_subscription = true; | |
74 get_subscriptions = true; | |
75 get_items = true; | |
76 | |
77 | |
78 subscribe_other = true; | |
79 unsubscribe_other = true; | |
80 get_subscription_other = true; | |
81 get_subscriptions_other = true; | |
82 | |
83 be_subscribed = true; | |
84 be_unsubscribed = true; | |
85 | |
86 set_affiliation = true; | |
87 }; | |
88 }; | |
13 }; | 89 }; |
14 local default_config_mt = { __index = default_config }; | 90 local default_config_mt = { __index = default_config }; |
15 | 91 |
16 local default_node_config = { | 92 local default_node_config = { |
17 ["persist_items"] = false; | 93 ["persist_items"] = false; |