mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Send authorization messages outside of get-pending transaction (thanks to Brian Cully)(EJAB-1090)
SVN Revision: 2720
This commit is contained in:
parent
1c2d639179
commit
ae93cf2c28
@ -1458,17 +1458,7 @@ send_pending_auth_events(Host, Node, Owner) ->
|
|||||||
true ->
|
true ->
|
||||||
case node_call(Type, get_affiliation, [NodeID, Owner]) of
|
case node_call(Type, get_affiliation, [NodeID, Owner]) of
|
||||||
{result, owner} ->
|
{result, owner} ->
|
||||||
{result, Subscriptions} = node_call(Type, get_node_subscriptions, [NodeID]),
|
node_call(Type, get_node_subscriptions, [NodeID]);
|
||||||
lists:foreach(fun({J, pending, _SubID}) ->
|
|
||||||
{U, S, R} = J,
|
|
||||||
send_authorization_request(Node, exmpp_jid:make(U,S,R));
|
|
||||||
({J, pending}) ->
|
|
||||||
{U, S, R} = J,
|
|
||||||
send_authorization_request(Node, exmpp_jid:make(U,S,R));
|
|
||||||
(_) ->
|
|
||||||
ok
|
|
||||||
end, Subscriptions),
|
|
||||||
{result, ok};
|
|
||||||
_ ->
|
_ ->
|
||||||
{error, exmpp_stanza:error(?NS_JABBER_CLIENT, 'forbidden')}
|
{error, exmpp_stanza:error(?NS_JABBER_CLIENT, 'forbidden')}
|
||||||
end;
|
end;
|
||||||
@ -1477,7 +1467,16 @@ send_pending_auth_events(Host, Node, Owner) ->
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
case transaction(Host, Node, Action, sync_dirty) of
|
case transaction(Host, Node, Action, sync_dirty) of
|
||||||
{result, _} ->
|
{result, {N, Subscriptions}} ->
|
||||||
|
lists:foreach(fun({J, pending, _SubID}) ->
|
||||||
|
{U, S, R} = J,
|
||||||
|
send_authorization_request(N, exmpp_jid:make(U,S,R));
|
||||||
|
({J, pending}) ->
|
||||||
|
{U, S, R} = J,
|
||||||
|
send_authorization_request(N, exmpp_jid:make(U,S,R));
|
||||||
|
(_) ->
|
||||||
|
ok
|
||||||
|
end, Subscriptions),
|
||||||
#adhoc_response{};
|
#adhoc_response{};
|
||||||
Err ->
|
Err ->
|
||||||
Err
|
Err
|
||||||
|
Loading…
Reference in New Issue
Block a user