diff options
author | Kim Alvefur <zash@zash.se> | 2016-04-06 21:29:30 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-04-06 21:29:30 +0200 |
commit | bb95b569ef884a8d6558271382acadcac2f87c66 (patch) | |
tree | 5c285233d3ccf3522b93121d4560218cefa7416d | |
parent | 52a8bdb8f5a075f9de7f31b64522300a1e84ccfb (diff) | |
download | prosody-bb95b569ef884a8d6558271382acadcac2f87c66.tar.gz prosody-bb95b569ef884a8d6558271382acadcac2f87c66.zip |
moduleapi: Allow an origin session to be passed to module:send()
-rw-r--r-- | core/moduleapi.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 402c7927..21b2216c 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -374,8 +374,8 @@ function api:provides(name, item) self:add_item(name.."-provider", item); end -function api:send(stanza) - return core_post_stanza(hosts[self.host], stanza); +function api:send(stanza, origin) + return core_post_stanza(origin or hosts[self.host], stanza); end function api:broadcast(jids, stanza, iter) |