Fix wrong virtual host in mod_pubsub:send_stanza (#2930)

This commit is contained in:
Christophe Romain 2019-07-22 10:13:27 +02:00
parent 4be98b5aef
commit c0dc95d529
1 changed files with 5 additions and 1 deletions

View File

@ -603,7 +603,11 @@ on_user_offline(C2SState, _Reason) ->
-spec out_subscription(presence()) -> any().
out_subscription(#presence{type = subscribed, from = From, to = To}) ->
send_last_pep(jid:remove_resource(From), To);
if From#jid.lserver == To#jid.lserver ->
send_last_pep(jid:remove_resource(From), To);
true ->
ok
end;
out_subscription(_) ->
ok.