projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27ac024
)
moduleapi: Allow an origin session to be passed to module:send()
author
Kim Alvefur
<zash@zash.se>
Wed, 6 Apr 2016 19:29:30 +0000
(21:29 +0200)
committer
Kim Alvefur
<zash@zash.se>
Wed, 6 Apr 2016 19:29:30 +0000
(21:29 +0200)
core/moduleapi.lua
patch
|
blob
|
history
diff --git
a/core/moduleapi.lua
b/core/moduleapi.lua
index 402c79275fe0456f2004c2b7aece035329d21dcc..21b2216ca2f3452c805a7b4cabe122d1910080b2 100644
(file)
--- 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)