24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00

Fix pubsub send_loop after 3fec7824

This commit is contained in:
Christophe Romain 2017-08-09 11:34:36 +02:00
parent bee251d928
commit e903348dd3

View File

@ -427,8 +427,8 @@ get_subscribed(User, Server) ->
send_loop(State) -> send_loop(State) ->
receive receive
{presence, JID, _Pid} -> {presence, JID, _Pid} ->
Host = State#state.server_host,
ServerHost = State#state.server_host, ServerHost = State#state.server_host,
Host = host(State#state.server_host),
DBType = State#state.db_type, DBType = State#state.db_type,
LJID = jid:tolower(JID), LJID = jid:tolower(JID),
BJID = jid:remove_resource(LJID), BJID = jid:remove_resource(LJID),
@ -469,7 +469,7 @@ send_loop(State) ->
send_loop(State); send_loop(State);
{presence, User, Server, Resources, JID} -> {presence, User, Server, Resources, JID} ->
spawn(fun() -> spawn(fun() ->
Host = State#state.server_host, Host = host(State#state.server_host),
Owner = jid:remove_resource(jid:tolower(JID)), Owner = jid:remove_resource(jid:tolower(JID)),
lists:foreach(fun(#pubsub_node{nodeid = {_, Node}, type = Type, id = Nidx, options = Options}) -> lists:foreach(fun(#pubsub_node{nodeid = {_, Node}, type = Type, id = Nidx, options = Options}) ->
case match_option(Options, send_last_published_item, on_sub_and_presence) of case match_option(Options, send_last_published_item, on_sub_and_presence) of