Changeset

2663:6e8c3fc48237

mod_storage_xmlarchive: Use the dates method in more places
author Kim Alvefur <zash@zash.se>
date Sat, 01 Apr 2017 17:39:39 +0200
parents 2662:2d5e0e2938d1
children 2664:5b97b04e9d1b
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Sun Apr 02 19:44:59 2017 +0100
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Sat Apr 01 17:39:39 2017 +0200
@@ -91,7 +91,7 @@
 	local stream_session = { notopen = true };
 	local stream_callbacks = { handlestanza = cb, stream_ns = "jabber:client", default_ns = "jabber:client" };
 	local stream = new_stream(stream_session, stream_callbacks);
-	local dates = dm.list_load(username, module.host, self.store) or empty;
+	local dates = self:dates() or empty;
 	local function reset_stream()
 		stream:reset();
 		stream_session.notopen = true;
@@ -244,7 +244,7 @@
 	end
 	local before = query.before or query["end"] or "9999-12-31";
 	if type(before) == "number" then before = dt.date(before); else before = before:sub(1, 10); end
-	local dates, err = dm.list_load(username, module.host, self.store);
+	local dates, err = self:dates(username);
 	if not dates or next(dates) == nil then
 		if not err then return true end -- already empty
 		return dates, err;