aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 575153b8..2f42809e 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -351,6 +351,15 @@ function service:get_items(node, actor, id)
end
end
+function service:get_last_item(node, actor)
+ -- Access checking
+ if not self:may(node, actor, "get_items") then
+ return false, "forbidden";
+ end
+ --
+ return true, self.data[node]:tail();
+end
+
function service:get_nodes(actor)
-- Access checking
if not self:may(nil, actor, "get_nodes") then