From 84a825533fefa3df91d2f0d61870375862d4ea1e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 18 Aug 2018 15:10:41 +0100 Subject: Pubsub: Add tests for :get_last_item() and fix for non-persistent nodes --- plugins/mod_pubsub/pubsub.lib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mod_pubsub') diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index af4876e8..d1231183 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -872,8 +872,8 @@ local function archive_itemstore(archive, config, user, node) truncate = size; }); end - function get_set:tail() - -- This should conveniently return the last item + function get_set:head() + -- This should conveniently return the most recent item local item = self:get(nil); if item then return item.attr.id, item; -- cgit v1.2.3