# HG changeset patch # User Kim Alvefur # Date 1491061179 -7200 # Node ID 6e8c3fc48237aa3695348bb8263840a824d2e4c1 # Parent 2d5e0e2938d10af7a68707ace7ad78897d2e4ad7 mod_storage_xmlarchive: Use the dates method in more places diff -r 2d5e0e2938d1 -r 6e8c3fc48237 mod_storage_xmlarchive/mod_storage_xmlarchive.lua --- 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;