diff options
-rw-r--r-- | core/moduleapi.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 2177378f..a577c07a 100644 --- a/core/moduleapi.lua +++ b/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; |