25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Fix filter_nodes

The previous implementation always returned an empty list while testing
it. However I don't really understand why that happened. The list
comprehension based one works, although it looks equivalent to me.
This commit is contained in:
Jonah Brüchert 2022-07-02 20:20:24 +02:00 committed by badlop
parent 0faf34b26d
commit 9a8a843724

View File

@ -593,10 +593,8 @@ known_nodes() ->
-spec filter_nodes([binary()]) -> [binary()]. -spec filter_nodes([binary()]) -> [binary()].
filter_nodes(Nodes) -> filter_nodes(Nodes) ->
lists:filter( KnownNodes = known_nodes(),
fun(Node) -> [Node || KnownNode <- KnownNodes, Node <- Nodes, KnownNode == Node].
lists:member(Node, Nodes)
end, known_nodes()).
-spec multicast(module(), binary(), binary(), -spec multicast(module(), binary(), binary(),
binary(), binary(), fun((jid()) -> message())) -> ok. binary(), binary(), fun((jid()) -> message())) -> ok.