mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
allow sending PEP to bare jid on s2s
This commit is contained in:
parent
20c2bc54cd
commit
77e549e504
@ -3105,9 +3105,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);
|
||||
_ ->
|
||||
|
@ -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);
|
||||
_ ->
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- mod_pubsub.erl 2010-03-05 18:19:48.033276211 +0100
|
||||
+++ mod_pubsub_odbc.erl 2010-03-05 18:20:02.694164397 +0100
|
||||
--- mod_pubsub.erl 2010-03-08 15:16:09.000000000 +0100
|
||||
+++ mod_pubsub_odbc.erl 2010-03-08 15:16:19.000000000 +0100
|
||||
@@ -42,7 +42,7 @@
|
||||
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
||||
%%% XEP-0060 section 12.18.
|
||||
@ -658,7 +658,7 @@
|
||||
_ -> Acc
|
||||
end;
|
||||
(_, Acc) ->
|
||||
@@ -3229,6 +3038,30 @@
|
||||
@@ -3233,6 +3042,30 @@
|
||||
Result
|
||||
end.
|
||||
|
||||
@ -689,7 +689,7 @@
|
||||
%% @spec (Host, Options) -> MaxItems
|
||||
%% Host = host()
|
||||
%% Options = [Option]
|
||||
@@ -3624,7 +3457,13 @@
|
||||
@@ -3628,7 +3461,13 @@
|
||||
tree_action(Host, Function, Args) ->
|
||||
?DEBUG("tree_action ~p ~p ~p",[Host,Function,Args]),
|
||||
Fun = fun() -> tree_call(Host, Function, Args) end,
|
||||
@ -704,7 +704,7 @@
|
||||
|
||||
%% @doc <p>node plugin call.</p>
|
||||
node_call(Type, Function, Args) ->
|
||||
@@ -3644,13 +3483,13 @@
|
||||
@@ -3648,13 +3487,13 @@
|
||||
|
||||
node_action(Host, Type, Function, Args) ->
|
||||
?DEBUG("node_action ~p ~p ~p ~p",[Host,Type,Function,Args]),
|
||||
@ -720,7 +720,7 @@
|
||||
case tree_call(Host, get_node, [Host, Node]) of
|
||||
N when is_record(N, pubsub_node) ->
|
||||
case Action(N) of
|
||||
@@ -3663,8 +3502,14 @@
|
||||
@@ -3667,8 +3506,14 @@
|
||||
end
|
||||
end, Trans).
|
||||
|
||||
@ -737,7 +737,7 @@
|
||||
{result, Result} -> {result, Result};
|
||||
{error, Error} -> {error, Error};
|
||||
{atomic, {result, Result}} -> {result, Result};
|
||||
@@ -3672,6 +3517,15 @@
|
||||
@@ -3676,6 +3521,15 @@
|
||||
{aborted, Reason} ->
|
||||
?ERROR_MSG("transaction return internal error: ~p~n", [{aborted, Reason}]),
|
||||
{error, ?ERR_INTERNAL_SERVER_ERROR};
|
||||
@ -753,7 +753,7 @@
|
||||
{'EXIT', Reason} ->
|
||||
?ERROR_MSG("transaction return internal error: ~p~n", [{'EXIT', Reason}]),
|
||||
{error, ?ERR_INTERNAL_SERVER_ERROR};
|
||||
@@ -3680,6 +3534,17 @@
|
||||
@@ -3684,6 +3538,17 @@
|
||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user