# HG changeset patch # User Kim Alvefur # Date 1700752594 -3600 # Node ID 79ba1a1a75ccb092310de4147aa4efc7a26b5099 # Parent 80702e33ba71afd16a485a35691503004edcd47e mod_storage_xmlarchive: Fix "user" iteration API Fixes use in prosody-migrator. Otherwise this particular API is not used much, or this would have been noticed before. Usually it is a different store like 'accounts' that is responsible for providing the authoritative list of users. Thanks Ge0rG for testing diff -r 80702e33ba71 -r 79ba1a1a75cc mod_storage_xmlarchive/mod_storage_xmlarchive.lua --- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Wed Nov 22 12:56:50 2023 +0100 +++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Thu Nov 23 16:16:34 2023 +0100 @@ -13,6 +13,7 @@ local new_stream = require "util.xmppstream".new; local xml = require "util.xml"; local async = require "util.async"; +local it = require "util.iterators"; local empty = {}; if not dm.append_raw then @@ -438,8 +439,13 @@ return dates; end +-- filter out the 'user@yyyy-mm-dd' stores +local function skip_at_date(item) + return not item:find("@"); +end + function archive:users() - return dm.users(module.host, self.store, "list"); + return it.filter(skip_at_date, dm.users(module.host, self.store, "list")); end local provider = {};