Mercurial > prosody-hg
comparison plugins/mod_mam/mod_mam.lua @ 7838:e5d5e5946af5
mod_mam: Use is_stanza from util.stanza
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 28 Nov 2016 07:35:49 +0100 |
| parents | a17bddf62a28 |
| children | f3e1925f29c2 |
comparison
equal
deleted
inserted
replaced
| 7837:a17bddf62a28 | 7838:e5d5e5946af5 |
|---|---|
| 19 local dataform = require "util.dataforms".new; | 19 local dataform = require "util.dataforms".new; |
| 20 local host = module.host; | 20 local host = module.host; |
| 21 | 21 |
| 22 local rm_load_roster = require "core.rostermanager".load_roster; | 22 local rm_load_roster = require "core.rostermanager".load_roster; |
| 23 | 23 |
| 24 local getmetatable = getmetatable; | 24 local is_stanza = st.is_stanza; |
| 25 local function is_stanza(x) | |
| 26 return getmetatable(x) == st.stanza_mt; | |
| 27 end | |
| 28 | |
| 29 local tostring = tostring; | 25 local tostring = tostring; |
| 30 local time_now = os.time; | 26 local time_now = os.time; |
| 31 local m_min = math.min; | 27 local m_min = math.min; |
| 32 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; | 28 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; |
| 33 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); | 29 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); |
