aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-22 18:01:24 +0100
committerKim Alvefur <zash@zash.se>2019-03-22 18:01:24 +0100
commit0028ea46e2aed1e0522da59b3d31912afea2c54a (patch)
treedbb175c9bf29bc5b562cfcb9a657cec00c602334
parentd7761bd914bd38e43de12c248196bc81307c71c5 (diff)
downloadprosody-0028ea46e2aed1e0522da59b3d31912afea2c54a.tar.gz
prosody-0028ea46e2aed1e0522da59b3d31912afea2c54a.zip
mod_storage_internal,_sql: Expose archive capabilities feature set
This was planned to be added long ago but was forgotten.
-rw-r--r--plugins/mod_storage_internal.lua6
-rw-r--r--plugins/mod_storage_sql.lua2
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua
index d812c0e9..c21fe0dc 100644
--- a/plugins/mod_storage_internal.lua
+++ b/plugins/mod_storage_internal.lua
@@ -47,6 +47,12 @@ end
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
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 4fe2a262..82c5c3fe 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -232,6 +232,8 @@ end
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)