diff options
author | Christophe Romain <chris.romain@gmail.com> | 2010-03-08 15:16:58 +0100 |
---|---|---|
committer | Christophe Romain <chris.romain@gmail.com> | 2010-03-08 15:16:58 +0100 |
commit | 77e549e504c8eba7ad3825ed16eaf2ce5bf632f6 (patch) | |
tree | 71910f188de44d8b945c4c15fbeabc1fc6759091 /src/mod_pubsub/mod_pubsub_odbc.erl | |
parent | Document mod_sic (EJAB-1205) (diff) |
allow sending PEP to bare jid on s2s
Diffstat (limited to 'src/mod_pubsub/mod_pubsub_odbc.erl')
-rw-r--r-- | src/mod_pubsub/mod_pubsub_odbc.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mod_pubsub/mod_pubsub_odbc.erl b/src/mod_pubsub/mod_pubsub_odbc.erl index f01ac865a..9acebf45c 100644 --- a/src/mod_pubsub/mod_pubsub_odbc.erl +++ b/src/mod_pubsub/mod_pubsub_odbc.erl @@ -2914,9 +2914,13 @@ broadcast_stanza({LUser, LServer, LResource}, Publisher, Node, NodeId, Type, Nod Contacts when is_list(Contacts) -> lists:foreach(fun({U, S, _}) -> spawn(fun() -> - lists:foreach(fun(To) -> - ejabberd_router:route(Sender, jlib:make_jid(To), StanzaToSend) - end, [{U, S, R} || R <- user_resources(U, S)]) + case lists:member(S, ?MYHOSTS) of + true -> + lists:foreach(fun(To) -> + ejabberd_router:route(Sender, jlib:make_jid(To), StanzaToSend) + end, [{U, S, R} || R <- user_resources(U, S)]); + false -> + ejabberd_router:route(Sender, jlib:make_jid(U, S, ""), StanzaToSend) end) end, Contacts); _ -> |