aboutsummaryrefslogtreecommitdiff
path: root/src/node_flat.erl
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2017-11-15 11:16:15 +0100
committerChristophe Romain <christophe.romain@process-one.net>2017-11-15 11:16:15 +0100
commite706e24b926dd2bc25cfb7b3b336f9fb9ab7d8f9 (patch)
tree4d6be9b0cd6a7a0a1b9916259e8d321db2500ac9 /src/node_flat.erl
parentImprove ACME description (diff)
Cleanup pubsub subscriptions quering, fix pep case
Diffstat (limited to 'src/node_flat.erl')
-rw-r--r--src/node_flat.erl15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/node_flat.erl b/src/node_flat.erl
index 18d4f4745..bc529e145 100644
--- a/src/node_flat.erl
+++ b/src/node_flat.erl
@@ -573,17 +573,10 @@ get_entity_subscriptions(Host, Owner) ->
get_node_subscriptions(Nidx) ->
{result, States} = get_states(Nidx),
Tr = fun (#pubsub_state{stateid = {J, _}, subscriptions = Subscriptions}) ->
- case Subscriptions of
- [_ | _] ->
- lists:foldl(fun ({S, SubId}, Acc) ->
- [{J, S, SubId} | Acc]
- end,
- [], Subscriptions);
- [] ->
- [];
- _ ->
- [{J, none}]
- end
+ lists:foldl(fun ({S, SubId}, Acc) ->
+ [{J, S, SubId} | Acc]
+ end,
+ [], Subscriptions)
end,
{result, lists:flatmap(Tr, States)}.