25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

fix remove_user not unsubscribing user (EJAB-684)

SVN Revision: 1659
This commit is contained in:
Christophe Romain 2008-10-16 23:09:51 +00:00
parent a910c4baa1
commit 0083e56c22
2 changed files with 7 additions and 3 deletions

View File

@ -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 <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: fix pubsub_publish_item hook

View File

@ -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) ->