Comparison

plugins/mod_storage_internal.lua @ 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
parent 9883:f76bd399267c
child 9885:64e16d1e91f6
comparison
equal deleted inserted replaced
9883:f76bd399267c 9884:9751c17f5281
44 return datamanager.users(host, self.store, self.type); 44 return datamanager.users(host, self.store, self.type);
45 end 45 end
46 46
47 local archive = {}; 47 local archive = {};
48 driver.archive = { __index = archive }; 48 driver.archive = { __index = archive };
49
50 archive.caps = {
51 total = true;
52 quota = archive_item_limit;
53 truncate = true;
54 };
49 55
50 function archive:append(username, key, value, when, with) 56 function archive:append(username, key, value, when, with)
51 when = when or now(); 57 when = when or now();
52 if not st.is_stanza(value) then 58 if not st.is_stanza(value) then
53 return nil, "unsupported-datatype"; 59 return nil, "unsupported-datatype";