moduleapi: Add module:send() as an alias for core_post_stanza() from the current host's origin

remotes/origin/0.11
Matthew Wild 14 years ago
parent 775261ef27
commit 78cd9a0ddc
  1. 5
      core/moduleapi.lua

@ -22,6 +22,7 @@ local tonumber, tostring = tonumber, tostring;
local prosody = prosody;
local hosts = prosody.hosts;
local core_post_stanza = prosody.core_post_stanza;
-- Registry of shared module data
local shared_data = setmetatable({}, { __mode = "v" });
@ -306,4 +307,8 @@ function api:provides(name, item)
self:add_item(name, item);
end
function api:send(stanza)
return core_post_stanza(hosts[self.host], stanza);
end
return api;

Loading…
Cancel
Save