summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-02-26 17:41:07 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-02-26 17:41:07 +0100 |
commit | 7658c4c7afa2a1c048b712fe5f227c18acc509a3 (patch) | |
tree | d6c524af17c0b8d07187a64b4af551f70b93e33a /src | |
parent | 4009cbf1320de13dc926be8d3399edb47d871769 (diff) |
...
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/reply/shr_set_map.erl | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/src/shared/reply/shr_set_map.erl b/src/shared/reply/shr_set_map.erl index 2e10c2e..f0af1cf 100644 --- a/src/shared/reply/shr_set_map.erl +++ b/src/shared/reply/shr_set_map.erl @@ -39,25 +39,19 @@ generate (User, TriggerVisibilityFun, Map) -> }, { <<"m">>, - lists:filtermap - ( - fun ({Key, Value}) -> - case shr_map_marker:can_access(User, Value) of - true -> - { - true, - { - [ - { Key, shr_map_marker:encode(Value) } - ] - } - }; - - false -> false - end - end, - shr_map:get_markers(Map) - ) + { + lists:foldl + ( + fun ({Key, Value}, Acc) -> + case shr_map_marker:can_access(User, Value) of + true -> [{ Key, shr_map_marker:encode(Value) }|Acc]; + false -> Acc + end + end, + [], + shr_map:get_markers(Map) + ) + } } ] }. |