mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-02 21:17:12 +02:00
Fix sender in case of explicit pep subscriptions
This commit is contained in:
parent
53e1100cc4
commit
07196b6c62
|
@ -3172,11 +3172,9 @@ subscription_to_string(_) -> <<"none">>.
|
||||||
Host :: mod_pubsub:host())
|
Host :: mod_pubsub:host())
|
||||||
-> jid()
|
-> jid()
|
||||||
).
|
).
|
||||||
service_jid(Host) ->
|
service_jid(#jid{} = Jid) -> Jid;
|
||||||
case Host of
|
service_jid({U, S, R}) -> jid:make(U, S, R);
|
||||||
{U, S, _} -> {jid, U, S, <<>>, U, S, <<>>};
|
service_jid(Host) -> jid:make(<<>>, Host, <<>>).
|
||||||
_ -> {jid, <<>>, Host, <<>>, <<>>, Host, <<>>}
|
|
||||||
end.
|
|
||||||
|
|
||||||
%% @spec (LJID, NotifyType, Depth, NodeOptions, SubOptions) -> boolean()
|
%% @spec (LJID, NotifyType, Depth, NodeOptions, SubOptions) -> boolean()
|
||||||
%% LJID = jid()
|
%% LJID = jid()
|
||||||
|
@ -3525,7 +3523,7 @@ broadcast_stanza(Host, _Node, _Nidx, _Type, NodeOptions, SubsByDepth, NotifyType
|
||||||
end, SubIDsByJID).
|
end, SubIDsByJID).
|
||||||
|
|
||||||
broadcast_stanza({LUser, LServer, LResource}, Publisher, Node, Nidx, Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) ->
|
broadcast_stanza({LUser, LServer, LResource}, Publisher, Node, Nidx, Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) ->
|
||||||
broadcast_stanza({LUser, LServer, LResource}, Node, Nidx, Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM),
|
broadcast_stanza({LUser, LServer, <<>>}, Node, Nidx, Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM),
|
||||||
%% Handles implicit presence subscriptions
|
%% Handles implicit presence subscriptions
|
||||||
SenderResource = user_resource(LUser, LServer, LResource),
|
SenderResource = user_resource(LUser, LServer, LResource),
|
||||||
case ejabberd_sm:get_session_pid(LUser, LServer, SenderResource) of
|
case ejabberd_sm:get_session_pid(LUser, LServer, SenderResource) of
|
||||||
|
|
Loading…
Reference in New Issue
Block a user