From 0083e56c22317c457179ea0c6c0acb3ca73e3f1b Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Thu, 16 Oct 2008 23:09:51 +0000 Subject: [PATCH] fix remove_user not unsubscribing user (EJAB-684) SVN Revision: 1659 --- ChangeLog | 3 +++ src/mod_pubsub/mod_pubsub.erl | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49bb0bac0..bb89bfc37 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-14 Christophe Romain * src/mod_pubsub/mod_pubsub.erl: fix pubsub_publish_item hook diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index aa395743a..24f39c9f2 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -518,8 +518,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) -> @@ -537,7 +538,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) ->