Software /
code /
prosody
Changeset
4614:20940729c1b4
moduleapi: Add module:send() as an alias for core_post_stanza() from the current host's origin
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 15 Mar 2012 02:53:05 +0000 |
parents | 4613:27fbc9c69eb5 |
children | 4615:29a9988c1e1b |
files | core/moduleapi.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/moduleapi.lua Thu Mar 15 02:52:31 2012 +0000 +++ b/core/moduleapi.lua Thu Mar 15 02:53:05 2012 +0000 @@ -22,6 +22,7 @@ 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 @@ self:add_item(name, item); end +function api:send(stanza) + return core_post_stanza(hosts[self.host], stanza); +end + return api;