Software /
code /
prosody
Comparison
plugins/mod_pep.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 | 9157:c517a219f2ac |
child | 9160:e13a1a0b0107 |
comparison
equal
deleted
inserted
replaced
9157:c517a219f2ac | 9158:37e814a680ab |
---|---|
147 local service = services[username]; | 147 local service = services[username]; |
148 if service then | 148 if service then |
149 return service; | 149 return service; |
150 end | 150 end |
151 service = pubsub.new({ | 151 service = pubsub.new({ |
152 capabilities = { | |
153 restricted = { | |
154 be_subscribed = false; | |
155 be_unsubscribed = true; | |
156 }; | |
157 none = { | |
158 create = false; | |
159 publish = false; | |
160 retract = false; | |
161 get_nodes = true; | |
162 | |
163 subscribe = true; | |
164 unsubscribe = true; | |
165 get_subscription = true; | |
166 get_subscriptions = true; | |
167 get_items = true; | |
168 | |
169 subscribe_other = false; | |
170 unsubscribe_other = false; | |
171 get_subscription_other = false; | |
172 get_subscriptions_other = false; | |
173 | |
174 be_subscribed = true; | |
175 be_unsubscribed = true; | |
176 | |
177 set_affiliation = false; | |
178 }; | |
179 publisher = { | |
180 create = false; | |
181 publish = true; | |
182 retract = true; | |
183 get_nodes = true; | |
184 get_configuration = true; | |
185 | |
186 subscribe = true; | |
187 unsubscribe = true; | |
188 get_subscription = true; | |
189 get_subscriptions = true; | |
190 get_items = true; | |
191 | |
192 subscribe_other = false; | |
193 unsubscribe_other = false; | |
194 get_subscription_other = false; | |
195 get_subscriptions_other = false; | |
196 | |
197 be_subscribed = true; | |
198 be_unsubscribed = true; | |
199 | |
200 set_affiliation = false; | |
201 }; | |
202 owner = { | |
203 create = true; | |
204 publish = true; | |
205 retract = true; | |
206 delete = true; | |
207 get_nodes = true; | |
208 configure = true; | |
209 get_configuration = true; | |
210 | |
211 subscribe = true; | |
212 unsubscribe = true; | |
213 get_subscription = true; | |
214 get_subscriptions = true; | |
215 get_items = true; | |
216 | |
217 | |
218 subscribe_other = true; | |
219 unsubscribe_other = true; | |
220 get_subscription_other = true; | |
221 get_subscriptions_other = true; | |
222 | |
223 be_subscribed = true; | |
224 be_unsubscribed = true; | |
225 | |
226 set_affiliation = true; | |
227 }; | |
228 }; | |
229 | |
230 node_defaults = { | 152 node_defaults = { |
231 ["max_items"] = 1; | 153 ["max_items"] = 1; |
232 ["persist_items"] = true; | 154 ["persist_items"] = true; |
233 ["access_model"] = "presence"; | 155 ["access_model"] = "presence"; |
234 }; | 156 }; |