aboutsummaryrefslogtreecommitdiff
path: root/src/mod_blocking.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2013-11-10 00:56:28 +1000
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2015-03-13 12:59:16 +0300
commitbbe5c6b74eaf9b9b3ba35f717c40617e11b225b7 (patch)
tree196450a0cfa50f2b1f3b5d14a11f904073998801 /src/mod_blocking.erl
parentFix unblock all when Riak is used as a backend (diff)
Do not fail on badly formed SQL results
Diffstat (limited to 'src/mod_blocking.erl')
-rw-r--r--src/mod_blocking.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_blocking.erl b/src/mod_blocking.erl
index 9eba5c950..27d727a14 100644
--- a/src/mod_blocking.erl
+++ b/src/mod_blocking.erl
@@ -236,7 +236,7 @@ process_blocklist_block(LUser, LServer, Filter, odbc) ->
<<"match_all">>, <<"match_iq">>, <<"match_message">>,
<<"match_presence_in">>, <<"match_presence_out">>],
RItems = [_ | _]} ->
- List = lists:map(fun mod_privacy:raw_to_item/1, RItems);
+ List = lists:flatmap(fun mod_privacy:raw_to_item/1, RItems);
_ -> List = []
end,
NewList = Filter(List),
@@ -432,8 +432,8 @@ process_blocklist_unblock(LUser, LServer, Filter,
<<"match_all">>, <<"match_iq">>, <<"match_message">>,
<<"match_presence_in">>, <<"match_presence_out">>],
RItems = [_ | _]} ->
- List = lists:map(fun mod_privacy:raw_to_item/1,
- RItems),
+ List = lists:flatmap(fun mod_privacy:raw_to_item/1,
+ RItems),
NewList = Filter(List),
NewRItems = lists:map(fun mod_privacy:item_to_raw/1,
NewList),
@@ -521,7 +521,7 @@ process_blocklist_get(LUser, LServer, odbc) ->
<<"match_all">>, <<"match_iq">>, <<"match_message">>,
<<"match_presence_in">>, <<"match_presence_out">>],
RItems} ->
- lists:map(fun mod_privacy:raw_to_item/1, RItems);
+ lists:flatmap(fun mod_privacy:raw_to_item/1, RItems);
{'EXIT', _} -> error
end;
{'EXIT', _} -> error