Software /
code /
prosody
Comparison
plugins/mod_muc_mam.lua @ 12861:57e86d537ffe
mod_muc_mam: Use higher precision timestamps
See also 781772c8b6d9
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Jan 2023 17:24:45 +0100 |
parent | 12859:cd738fb8c754 |
child | 12977:74b9e05af71e |
comparison
equal
deleted
inserted
replaced
12860:38b3cd292ee5 | 12861:57e86d537ffe |
---|---|
27 local mod_muc = module:depends"muc"; | 27 local mod_muc = module:depends"muc"; |
28 local get_room_from_jid = mod_muc.get_room_from_jid; | 28 local get_room_from_jid = mod_muc.get_room_from_jid; |
29 | 29 |
30 local is_stanza = st.is_stanza; | 30 local is_stanza = st.is_stanza; |
31 local tostring = tostring; | 31 local tostring = tostring; |
32 local time_now = os.time; | 32 local time_now = require "util.time".now; |
33 local m_min = math.min; | 33 local m_min = math.min; |
34 local timestamp, datestamp = import("util.datetime", "datetime", "date"); | 34 local timestamp, datestamp = import("util.datetime", "datetime", "date"); |
35 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); | 35 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); |
36 | 36 |
37 local cleanup_after = module:get_option_string("muc_log_expires_after", "1w"); | 37 local cleanup_after = module:get_option_string("muc_log_expires_after", "1w"); |