aboutsummaryrefslogtreecommitdiff
path: root/src/mod_pubsub/node_hometree.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_pubsub/node_hometree.erl')
-rw-r--r--src/mod_pubsub/node_hometree.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl
index 5ce7b9724..6ba6bb910 100644
--- a/src/mod_pubsub/node_hometree.erl
+++ b/src/mod_pubsub/node_hometree.erl
@@ -395,6 +395,10 @@ unsubscribe_node(NodeId, Sender, Subscriber, SubId) ->
{error, ?ERR_EXTENDED(?ERR_UNEXPECTED_REQUEST,
"not-subscribed")}
end;
+ %% Asking to remove all subscriptions to the given node
+ SubId == all ->
+ [delete_subscription(SubKey, NodeId, S, SubState) || S <- Subscriptions],
+ {result, default};
%% No subid supplied, but there's only one matching
%% subscription, so use that.
length(Subscriptions) == 1 ->