]> granicus.if.org Git - ejabberd/commitdiff
fix remove_user not unsubscribing user (EJAB-684)
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 16 Oct 2008 23:07:06 +0000 (23:07 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 16 Oct 2008 23:07:06 +0000 (23:07 +0000)
SVN Revision: 1658

ChangeLog
src/mod_pubsub/mod_pubsub.erl

index 1d2f7bf9cc5ef1476fee34ff4b01137fca9f66f2..1cf4c836ca61ebf8c0ad42d6e401a43be0d278c9 100644 (file)
--- 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  <jerome.sautret@process-one.net>
 
        * src/odbc/ejabberd_odbc.erl: log MySQL driver messages.
index cd168f888cf0d52476c28960dd095f8bc1e48e02..7e4d26420aef49ee5e9515894265567116af5107 100644 (file)
@@ -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) ->