mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +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:
parent
0faf34b26d
commit
9a8a843724
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user