comparison mod_mam_muc/mod_mam_muc.lua @ 2498:e065e94f0ac6

mod_mam_muc: Remove fallback for util.stanza.is_stanza, it should be available
author Kim Alvefur <zash@zash.se>
date Tue, 14 Feb 2017 09:45:34 +0100
parents c6761ebe613b
children ec046f915506
comparison
equal deleted inserted replaced
2497:c6761ebe613b 2498:e065e94f0ac6
31 local get_room_from_jid = rawget(mod_muc, "get_room_from_jid") or 31 local get_room_from_jid = rawget(mod_muc, "get_room_from_jid") or
32 function (jid) 32 function (jid)
33 return rooms[jid]; 33 return rooms[jid];
34 end 34 end
35 35
36 local getmetatable = getmetatable; 36 local is_stanza = st.is_stanza;
37 local is_stanza = st.is_stanza or function(x)
38 return getmetatable(x) == st.stanza_mt;
39 end
40
41 local tostring = tostring; 37 local tostring = tostring;
42 local time_now = os.time; 38 local time_now = os.time;
43 local m_min = math.min; 39 local m_min = math.min;
44 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; 40 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse;
45 local max_history_length = module:get_option_number("max_history_messages", 1000); 41 local max_history_length = module:get_option_number("max_history_messages", 1000);