Software /
code /
prosody
Changeset
9884:9751c17f5281
mod_storage_internal,_sql: Expose archive capabilities feature set
This was planned to be added long ago but was forgotten.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 22 Mar 2019 18:01:24 +0100 |
parents | 9883:f76bd399267c |
children | 9885:64e16d1e91f6 |
files | plugins/mod_storage_internal.lua plugins/mod_storage_sql.lua |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_internal.lua Fri Oct 20 12:53:53 2017 +0200 +++ b/plugins/mod_storage_internal.lua Fri Mar 22 18:01:24 2019 +0100 @@ -47,6 +47,12 @@ local archive = {}; driver.archive = { __index = archive }; +archive.caps = { + total = true; + quota = archive_item_limit; + truncate = true; +}; + function archive:append(username, key, value, when, with) when = when or now(); if not st.is_stanza(value) then
--- a/plugins/mod_storage_sql.lua Fri Oct 20 12:53:53 2017 +0200 +++ b/plugins/mod_storage_sql.lua Fri Mar 22 18:01:24 2019 +0100 @@ -232,6 +232,8 @@ local archive_store = {} archive_store.caps = { total = true; + quota = archive_item_limit; + truncate = true; }; archive_store.__index = archive_store function archive_store:append(username, key, value, when, with)