From: Christophe Romain Date: Thu, 16 Oct 2008 23:07:06 +0000 (+0000) Subject: fix remove_user not unsubscribing user (EJAB-684) X-Git-Tag: v2.0.3~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2b8263a20d328a9eb6d4d27322c6e6c2f5c85af;p=ejabberd fix remove_user not unsubscribing user (EJAB-684) SVN Revision: 1658 --- diff --git a/ChangeLog b/ChangeLog index 1d2f7bf9c..1cf4c836c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * src/mod_pubsub/mod_pubsub.erl: fix badarg issue on get_roster_info when allowed roster groups is not defined + * src/mod_pubsub/mod_pubsub.erl: fix remove_user not unsubscribing + user (EJAB-684) + 2008-10-13 Jerome Sautret * src/odbc/ejabberd_odbc.erl: log MySQL driver messages. diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index cd168f888..7e4d26420 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -513,8 +513,9 @@ handle_cast({presence, JID, Pid}, State) -> end, {noreply, State}; -handle_cast({remove_user, User, Host}, State) -> - Owner = jlib:make_jid(User, Host, ""), +handle_cast({remove_user, LUser, LServer}, State) -> + Host = State#state.host, + Owner = jlib:make_jid(LUser, LServer, ""), OwnerKey = jlib:jid_tolower(jlib:jid_remove_resource(Owner)), %% remove user's subscriptions lists:foreach(fun(Type) -> @@ -532,7 +533,7 @@ handle_cast({remove_user, User, Host}, State) -> delete_node(NodeKey, NodeName, Owner) end, tree_action(Host, get_nodes, [OwnerKey])), %% remove user's nodes - delete_node(Host, ["home", Host, User], Owner), + delete_node(Host, ["home", LServer, LUser], Owner), {noreply, State}; handle_cast(_Msg, State) ->