Comparison

plugins/mod_storage_internal.lua @ 13766:b11242656300

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Mar 2025 18:45:23 +0000
parent 13761:8f516d20d288
child 13847:cbd234461c41
comparison
equal deleted inserted replaced
13759:1437d8884899 13766:b11242656300
2 local datamanager = require "prosody.core.storagemanager".olddm; 2 local datamanager = require "prosody.core.storagemanager".olddm;
3 local array = require "prosody.util.array"; 3 local array = require "prosody.util.array";
4 local datetime = require "prosody.util.datetime"; 4 local datetime = require "prosody.util.datetime";
5 local st = require "prosody.util.stanza"; 5 local st = require "prosody.util.stanza";
6 local now = require "prosody.util.time".now; 6 local now = require "prosody.util.time".now;
7 local id = require "prosody.util.id".medium; 7 local uuid_v7 = require "prosody.util.uuid".v7;
8 local jid_join = require "prosody.util.jid".join; 8 local jid_join = require "prosody.util.jid".join;
9 local set = require "prosody.util.set"; 9 local set = require "prosody.util.set";
10 local it = require "prosody.util.iterators"; 10 local it = require "prosody.util.iterators";
11 11
12 local host = module.host; 12 local host = module.host;
109 end 109 end
110 if item_count >= archive_item_limit then 110 if item_count >= archive_item_limit then
111 module:log("debug", "%s reached or over quota, not adding to store", username); 111 module:log("debug", "%s reached or over quota, not adding to store", username);
112 return nil, "quota-limit"; 112 return nil, "quota-limit";
113 end 113 end
114 key = id(); 114 key = uuid_v7();
115 end 115 end
116 116
117 module:log("debug", "%s has %d items out of %d limit in store %s", username, item_count, archive_item_limit, self.store); 117 module:log("debug", "%s has %d items out of %d limit in store %s", username, item_count, archive_item_limit, self.store);
118 118
119 value.key = key; 119 value.key = key;