Mercurial > prosody-modules
comparison mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 3585:ddf109d58eff
mod_storage_xmlarchive: Add support for user iteration API
Helps migration tools discover available users
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 May 2019 16:09:30 +0200 |
parents | 7700c9537e90 |
children | c24d43ababc6 |
comparison
equal
deleted
inserted
replaced
3584:611ac62c5b63 | 3585:ddf109d58eff |
---|---|
282 local dates, err = dm.list_load(username, self.host, self.store); | 282 local dates, err = dm.list_load(username, self.host, self.store); |
283 if not dates then return dates, err; end | 283 if not dates then return dates, err; end |
284 assert(type(dates[1]) == "string" and type(dates[#dates]) == "string", | 284 assert(type(dates[1]) == "string" and type(dates[#dates]) == "string", |
285 "Archive does not appear to be in xmlarchive format"); | 285 "Archive does not appear to be in xmlarchive format"); |
286 return dates; | 286 return dates; |
287 end | |
288 | |
289 function archive:users() | |
290 return dm.users(module.host, self.store, "list"); | |
287 end | 291 end |
288 | 292 |
289 local provider = {}; | 293 local provider = {}; |
290 function provider:open(store, typ) | 294 function provider:open(store, typ) |
291 if typ ~= "archive" then return nil, "unsupported-store"; end | 295 if typ ~= "archive" then return nil, "unsupported-store"; end |