aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-08-18 15:10:41 +0100
committerMatthew Wild <mwild1@gmail.com>2018-08-18 15:10:41 +0100
commit84a825533fefa3df91d2f0d61870375862d4ea1e (patch)
treede56a4bf7b2c9da5d1c6c20c0975bf8259886a8f /plugins
parentdf1abfdd10b291f3d170b2be1a8ce6ffd3b2ccc0 (diff)
downloadprosody-84a825533fefa3df91d2f0d61870375862d4ea1e.tar.gz
prosody-84a825533fefa3df91d2f0d61870375862d4ea1e.zip
Pubsub: Add tests for :get_last_item() and fix for non-persistent nodes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua4
1 files changed, 2 insertions, 2 deletions
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;