]> granicus.if.org Git - ejabberd/commitdiff
fix unsubscription of full jid subscribed node (EJAB-839)
authorChristophe Romain <christophe.romain@process-one.net>
Sat, 10 Jan 2009 13:38:10 +0000 (13:38 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Sat, 10 Jan 2009 13:38:10 +0000 (13:38 +0000)
SVN Revision: 1794

ChangeLog
src/mod_pubsub/node_default.erl

index f30084f0610b82c41af1dd8e67eade7e5fba83bc..ed215105aae0646be21dfda580707dd72cc1fe95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-10  Christophe Romain <christophe.romain@process-one.net>
+
+       * src/mod_pubsub/node_default.erl: fix unsubscription of full jid
+       subscribed node (thanks to Andy Skelton)(EJAB-839)
+
 2009-01-09  Badlop  <badlop@process-one.net>
 
        * doc/guide.tex: Improve explanation of backup commands (EJAB-832)
index ae4717cef2739425e968d7db3eb70318514a63ac..9583b34a02c6a3f2234eeb0b33efe886bfa63a5c 100644 (file)
@@ -372,11 +372,10 @@ unsubscribe_node(Host, Node, Sender, Subscriber, _SubId) ->
        (not Authorized) and (Affiliation =/= owner) ->
            {error, ?ERR_FORBIDDEN};
        %% Was just subscriber, remove the record
-       Affiliation == none ->
+       SubState#pubsub_state.affiliation == none ->
            del_state(SubState#pubsub_state.stateid),
            {result, default};
        true ->
-           %% TODO, may require better clean
            set_state(SubState#pubsub_state{subscription = none}),
            {result, default}
     end.