mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
remove pubsub_state record when unsubscribing node without affiliation (EJAB-776)
SVN Revision: 1717
This commit is contained in:
parent
dceb817853
commit
23ce0b312d
@ -26,6 +26,9 @@
|
||||
* src/mod_pubsub/mod_pubsub.erl: reply to suscriptions options queries
|
||||
with unsupported feature error (EJAB-713)
|
||||
|
||||
* src/mod_pubsub/node_default.erl: remove pubsub_state record when
|
||||
unsubscribing node without affiliation (EJAB-776)
|
||||
|
||||
2008-12-08 Mickael Remond <mremond@process-one.net>
|
||||
|
||||
* src/ejabberd_c2s.erl: Enforce client stanza from attribute
|
||||
|
@ -381,6 +381,10 @@ unsubscribe_node(Host, Node, Sender, Subscriber, _SubId) ->
|
||||
%% Requesting entity is prohibited from unsubscribing entity
|
||||
not Authorized ->
|
||||
{error, ?ERR_FORBIDDEN};
|
||||
%% Was just subscriber, remove the record
|
||||
State#pubsub_state.affiliation == none ->
|
||||
mnesia:delete({pubsub_state, State#pubsub_state.stateid}),
|
||||
{result, default};
|
||||
true ->
|
||||
set_state(State#pubsub_state{subscription = none}),
|
||||
{result, default}
|
||||
|
Loading…
Reference in New Issue
Block a user