aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2016-11-22 16:59:02 +0100
committerChristophe Romain <christophe.romain@process-one.net>2016-11-22 16:59:02 +0100
commit9ab169bc6366187d17e1137d0c26a67849ff4451 (patch)
tree8452aaa10f28e5d9203b4b9b88ab59ba2e820410 /src
parentFix vcard_ldap exports (diff)
Fix get_roster issue injected by fbfbb96
Diffstat (limited to 'src')
-rw-r--r--src/mod_roster_mnesia.erl2
-rw-r--r--src/mod_roster_riak.erl4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_roster_mnesia.erl b/src/mod_roster_mnesia.erl
index 1a33407e1..e274ac5eb 100644
--- a/src/mod_roster_mnesia.erl
+++ b/src/mod_roster_mnesia.erl
@@ -51,7 +51,7 @@ write_roster_version(LUser, LServer, InTransaction, Ver) ->
end.
get_roster(LUser, LServer) ->
- {ok, mnesia:dirty_index_read(roster, {LUser, LServer}, #roster.us)}.
+ mnesia:dirty_index_read(roster, {LUser, LServer}, #roster.us).
get_roster_by_jid(LUser, LServer, LJID) ->
case mnesia:read({roster, {LUser, LServer, LJID}}) of
diff --git a/src/mod_roster_riak.erl b/src/mod_roster_riak.erl
index 53f0e7fb4..40992d77d 100644
--- a/src/mod_roster_riak.erl
+++ b/src/mod_roster_riak.erl
@@ -41,8 +41,8 @@ write_roster_version(LUser, LServer, _InTransaction, Ver) ->
get_roster(LUser, LServer) ->
case ejabberd_riak:get_by_index(roster, roster_schema(),
<<"us">>, {LUser, LServer}) of
- {ok, Items} -> {ok, Items};
- _Err -> error
+ {ok, Items} -> Items;
+ _Err -> []
end.
get_roster_by_jid(LUser, LServer, LJID) ->