Diff

plugins/mod_pubsub/pubsub.lib.lua @ 9206:33ee40dc3e25

Pubsub: Add tests for :get_last_item() and fix for non-persistent nodes
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 Aug 2018 15:10:41 +0100
parent 9200:249d90ff992e
child 9207:76d593b35958
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua	Sat Aug 18 14:38:18 2018 +0100
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Sat Aug 18 15:10:41 2018 +0100
@@ -872,8 +872,8 @@
 			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;