mirror of
https://github.com/processone/ejabberd.git
synced 2024-08-14 01:38:09 +02:00
enforce pubsub cleaner
This commit is contained in:
parent
2e33904bb8
commit
70c1e1d0b1
@ -24,6 +24,10 @@ purge() ->
|
||||
[N]=mnesia:dirty_read({pubsub_node, K}),
|
||||
I=element(3,N),
|
||||
lists:foreach(fun(JID) ->
|
||||
case mnesia:dirty_read({pubsub_state, {JID, I}}) of
|
||||
[{pubsub_state, K, _, _, [{subscribed,S}]}] -> mnesia:dirty_delete({pubsub_subscription, S});
|
||||
_ -> ok
|
||||
end,
|
||||
mnesia:dirty_delete({pubsub_state, {JID, I}})
|
||||
end, offline(pubsub_debug:subscribed(I)))
|
||||
end, mnesia:dirty_all_keys(pubsub_node));
|
||||
|
Loading…
Reference in New Issue
Block a user