]> 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:35:34 +0000 (13:35 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Sat, 10 Jan 2009 13:35:34 +0000 (13:35 +0000)
SVN Revision: 1793

ChangeLog
src/mod_pubsub/node_default.erl

index 305514da80ca43b262aac166df0feed211a73478..3ba623f370f8cc166dcad37688226eb25026be28 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/release_notes_2.0.3.txt: New file for new release
index fa0e24d54a879b69609c9ec8948ff3be064596ca..c1434087dc715a465deda3fc3503149a1826e49e 100644 (file)
@@ -367,11 +367,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.