mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 05:07:42 +03:00
mod_storage_internal: Use UUIDv7 for message ids
This matches what we use for SQL already, so provides some consistency. Client developers prefer sortable ids.
This commit is contained in:
parent
e66265d65a
commit
afb9bc34a0
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ local array = require "prosody.util.array";
|
||||||
local datetime = require "prosody.util.datetime";
|
local datetime = require "prosody.util.datetime";
|
||||||
local st = require "prosody.util.stanza";
|
local st = require "prosody.util.stanza";
|
||||||
local now = require "prosody.util.time".now;
|
local now = require "prosody.util.time".now;
|
||||||
local id = require "prosody.util.id".medium;
|
local uuid_v7 = require "prosody.util.uuid".v7;
|
||||||
local jid_join = require "prosody.util.jid".join;
|
local jid_join = require "prosody.util.jid".join;
|
||||||
local set = require "prosody.util.set";
|
local set = require "prosody.util.set";
|
||||||
local it = require "prosody.util.iterators";
|
local it = require "prosody.util.iterators";
|
||||||
|
@ -111,7 +111,7 @@ function archive:append(username, key, value, when, with)
|
||||||
module:log("debug", "%s reached or over quota, not adding to store", username);
|
module:log("debug", "%s reached or over quota, not adding to store", username);
|
||||||
return nil, "quota-limit";
|
return nil, "quota-limit";
|
||||||
end
|
end
|
||||||
key = id();
|
key = uuid_v7();
|
||||||
end
|
end
|
||||||
|
|
||||||
module:log("debug", "%s has %d items out of %d limit in store %s", username, item_count, archive_item_limit, self.store);
|
module:log("debug", "%s has %d items out of %d limit in store %s", username, item_count, archive_item_limit, self.store);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue