plugins/mod_storage_memory.lua
changeset 10225 068692cb9e78
parent 10224 1e2b444acb72
child 10226 51f145094648
--- a/plugins/mod_storage_memory.lua	Fri Aug 23 01:04:00 2019 +0200
+++ b/plugins/mod_storage_memory.lua	Fri Aug 23 01:10:27 2019 +0200
@@ -171,11 +171,14 @@
 	local iter, err = self:find(username, query)
 	if not iter then return iter, err; end
 	local counts = {};
-	for _, _, _, with in iter do
+	local latest = {};
+	for _, _, when, with in iter do
 		counts[with] = (counts[with] or 0) + 1;
+		latest[with] = when;
 	end
 	return {
 		counts = counts;
+		latest = latest;
 	};
 end