Software /
code /
prosody
File
util/import.lua @ 10045:6714578cfd6e 0.11
mod_pep: Revert 045209b41b3a, caused a regression
Adding in all presence based subscriptions in the broadcaster caused
resend_last_item() to unintentionally send out more notifications than
it should have.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Jun 2019 12:58:00 +0200 |
parent | 8570:a4ef8cfa97bd |
child | 9692:affcbccc1dff |
line wrap: on
line source
-- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- local unpack = table.unpack or unpack; --luacheck: ignore 113 143 local t_insert = table.insert; function _G.import(module, ...) local m = package.loaded[module] or require(module); if type(m) == "table" and ... then local ret = {}; for _, f in ipairs{...} do t_insert(ret, m[f]); end return unpack(ret); end return m; end