25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +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()].
filter_nodes(Nodes) ->
lists:filter(
fun(Node) ->
lists:member(Node, Nodes)
end, known_nodes()).
KnownNodes = known_nodes(),
[Node || KnownNode <- KnownNodes, Node <- Nodes, KnownNode == Node].
-spec multicast(module(), binary(), binary(),
binary(), binary(), fun((jid()) -> message())) -> ok.