mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
allows PEP to send to bare jid on s2s
This commit is contained in:
parent
13412129ec
commit
37a23e69d7
@ -3193,9 +3193,14 @@ broadcast_stanza({LUser, LServer, LResource}, Publisher, Node, NodeId, Type, Nod
|
|||||||
Contacts when is_list(Contacts) ->
|
Contacts when is_list(Contacts) ->
|
||||||
lists:foreach(fun({U, S, _}) ->
|
lists:foreach(fun({U, S, _}) ->
|
||||||
spawn(fun() ->
|
spawn(fun() ->
|
||||||
lists:foreach(fun(R) ->
|
case lists:member(S, ?MYHOSTS) of
|
||||||
ejabberd_router:route(Sender, exmpp_jid:make(U, S, R), StanzaToSend)
|
true ->
|
||||||
end, user_resources(U, S))
|
lists:foreach(fun(R) ->
|
||||||
|
ejabberd_router:route(Sender, exmpp_jid:make(U, S, R), StanzaToSend)
|
||||||
|
end, user_resources(U, S));
|
||||||
|
false ->
|
||||||
|
ejabberd_router:route(Sender, jlib:make_jid(U, S, ""), StanzaToSend)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end, Contacts);
|
end, Contacts);
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -3005,9 +3005,14 @@ broadcast_stanza({LUser, LServer, LResource}, Publisher, Node, NodeId, Type, Nod
|
|||||||
Contacts when is_list(Contacts) ->
|
Contacts when is_list(Contacts) ->
|
||||||
lists:foreach(fun({U, S, _}) ->
|
lists:foreach(fun({U, S, _}) ->
|
||||||
spawn(fun() ->
|
spawn(fun() ->
|
||||||
lists:foreach(fun(R) ->
|
case lists:member(S, ?MYHOSTS) of
|
||||||
ejabberd_router:route(Sender, exmpp_jid:make(U, S, R), StanzaToSend)
|
true ->
|
||||||
end, user_resources(U, S))
|
lists:foreach(fun(R) ->
|
||||||
|
ejabberd_router:route(Sender, exmpp_jid:make(U, S, R), StanzaToSend)
|
||||||
|
end, user_resources(U, S));
|
||||||
|
false ->
|
||||||
|
ejabberd_router:route(Sender, jlib:make_jid(U, S, ""), StanzaToSend)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end, Contacts);
|
end, Contacts);
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- mod_pubsub.erl 2010-03-05 18:31:50.000000000 +0100
|
--- mod_pubsub.erl 2010-03-08 15:25:53.000000000 +0100
|
||||||
+++ mod_pubsub_odbc.erl 2010-03-05 18:32:08.000000000 +0100
|
+++ mod_pubsub_odbc.erl 2010-03-08 15:26:10.000000000 +0100
|
||||||
@@ -42,7 +42,7 @@
|
@@ -42,7 +42,7 @@
|
||||||
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
||||||
%%% XEP-0060 section 12.18.
|
%%% XEP-0060 section 12.18.
|
||||||
@ -715,7 +715,7 @@
|
|||||||
%broadcast(Host, Node, NodeId, Type, NodeOptions, Feature, Force, ElName, SubEls) ->
|
%broadcast(Host, Node, NodeId, Type, NodeOptions, Feature, Force, ElName, SubEls) ->
|
||||||
% case (get_option(NodeOptions, Feature) or Force) of
|
% case (get_option(NodeOptions, Feature) or Force) of
|
||||||
% true ->
|
% true ->
|
||||||
@@ -3318,6 +3130,30 @@
|
@@ -3323,6 +3135,30 @@
|
||||||
Result
|
Result
|
||||||
end.
|
end.
|
||||||
|
|
||||||
@ -746,7 +746,7 @@
|
|||||||
%% @spec (Host, Options) -> MaxItems
|
%% @spec (Host, Options) -> MaxItems
|
||||||
%% Host = host()
|
%% Host = host()
|
||||||
%% Options = [Option]
|
%% Options = [Option]
|
||||||
@@ -3716,7 +3552,13 @@
|
@@ -3721,7 +3557,13 @@
|
||||||
tree_action(Host, Function, Args) ->
|
tree_action(Host, Function, Args) ->
|
||||||
?DEBUG("tree_action ~p ~p ~p",[Host,Function,Args]),
|
?DEBUG("tree_action ~p ~p ~p",[Host,Function,Args]),
|
||||||
Fun = fun() -> tree_call(Host, Function, Args) end,
|
Fun = fun() -> tree_call(Host, Function, Args) end,
|
||||||
@ -761,7 +761,7 @@
|
|||||||
|
|
||||||
%% @doc <p>node plugin call.</p>
|
%% @doc <p>node plugin call.</p>
|
||||||
node_call(Type, Function, Args) ->
|
node_call(Type, Function, Args) ->
|
||||||
@@ -3736,13 +3578,13 @@
|
@@ -3741,13 +3583,13 @@
|
||||||
|
|
||||||
node_action(Host, Type, Function, Args) ->
|
node_action(Host, Type, Function, Args) ->
|
||||||
?DEBUG("node_action ~p ~p ~p ~p",[Host,Type,Function,Args]),
|
?DEBUG("node_action ~p ~p ~p ~p",[Host,Type,Function,Args]),
|
||||||
@ -777,7 +777,7 @@
|
|||||||
case tree_call(Host, get_node, [Host, Node]) of
|
case tree_call(Host, get_node, [Host, Node]) of
|
||||||
N when is_record(N, pubsub_node) ->
|
N when is_record(N, pubsub_node) ->
|
||||||
case Action(N) of
|
case Action(N) of
|
||||||
@@ -3755,8 +3597,15 @@
|
@@ -3760,8 +3602,15 @@
|
||||||
end
|
end
|
||||||
end, Trans).
|
end, Trans).
|
||||||
|
|
||||||
@ -795,7 +795,7 @@
|
|||||||
{result, Result} -> {result, Result};
|
{result, Result} -> {result, Result};
|
||||||
{error, Error} -> {error, Error};
|
{error, Error} -> {error, Error};
|
||||||
{atomic, {result, Result}} -> {result, Result};
|
{atomic, {result, Result}} -> {result, Result};
|
||||||
@@ -3764,6 +3613,15 @@
|
@@ -3769,6 +3618,15 @@
|
||||||
{aborted, Reason} ->
|
{aborted, Reason} ->
|
||||||
?ERROR_MSG("transaction return internal error: ~p~n", [{aborted, Reason}]),
|
?ERROR_MSG("transaction return internal error: ~p~n", [{aborted, Reason}]),
|
||||||
{error, 'internal-server-error'};
|
{error, 'internal-server-error'};
|
||||||
@ -811,7 +811,7 @@
|
|||||||
{'EXIT', Reason} ->
|
{'EXIT', Reason} ->
|
||||||
?ERROR_MSG("transaction return internal error: ~p~n", [{'EXIT', Reason}]),
|
?ERROR_MSG("transaction return internal error: ~p~n", [{'EXIT', Reason}]),
|
||||||
{error, 'internal-server-error'};
|
{error, 'internal-server-error'};
|
||||||
@@ -3772,6 +3630,16 @@
|
@@ -3777,6 +3635,16 @@
|
||||||
{error, 'internal-server-error'}
|
{error, 'internal-server-error'}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user