diff options
author | Florian Zeitz <florob@babelmonkeys.de> | 2010-12-01 23:38:47 +0100 |
---|---|---|
committer | Florian Zeitz <florob@babelmonkeys.de> | 2010-12-01 23:38:47 +0100 |
commit | f85b16f9fa8e1fde7abda68f0da1b024c926807c (patch) | |
tree | c87ae84d4766c375c9d47feb950ce08b99455080 /util/pubsub.lua | |
parent | 2fd7797f35de1e31834e53d8a87f907f286b6afb (diff) | |
download | prosody-f85b16f9fa8e1fde7abda68f0da1b024c926807c.tar.gz prosody-f85b16f9fa8e1fde7abda68f0da1b024c926807c.zip |
mod_pubsub, util.pubsub: Support node creation
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r-- | util/pubsub.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index da90fdcc..dc3f3432 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -28,6 +28,14 @@ function service:get_subscription(node, actor, jid) end end +function service:create(node, actor) + if not self.nodes[node] then + self.nodes[node] = { name = node, subscribers = {}, config = {}, data = {} }; + return true; + end + return false, "conflict"; +end + function service:publish(node, actor, id, item) local node_obj = self.nodes[node]; if not node_obj then |