Software /
code /
prosody
Comparison
plugins/mod_storage_internal.lua @ 10001:55f5588d71c6
mod_storage_internal: Add support for iterating over users in archive stores
May help with writing a better migrator
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 May 2019 16:07:16 +0200 |
parent | 9997:7c4631d7b6fb |
child | 10018:7408b9473729 |
comparison
equal
deleted
inserted
replaced
10000:189b00a782bf | 10001:55f5588d71c6 |
---|---|
209 summary[with] = (summary[with] or 0) + 1; | 209 summary[with] = (summary[with] or 0) + 1; |
210 end | 210 end |
211 return summary; | 211 return summary; |
212 end | 212 end |
213 | 213 |
214 function archive:users() | |
215 return datamanager.users(host, self.store, "list"); | |
216 end | |
217 | |
214 function archive:delete(username, query) | 218 function archive:delete(username, query) |
215 local cache_key = jid_join(username, host, self.store); | 219 local cache_key = jid_join(username, host, self.store); |
216 if not query or next(query) == nil then | 220 if not query or next(query) == nil then |
217 archive_item_count_cache:set(cache_key, nil); | 221 archive_item_count_cache:set(cache_key, nil); |
218 return datamanager.list_store(username, host, self.store, nil); | 222 return datamanager.list_store(username, host, self.store, nil); |