]> granicus.if.org Git - ejabberd/commitdiff
Fix get_roster issue injected by fbfbb96
authorChristophe Romain <christophe.romain@process-one.net>
Tue, 22 Nov 2016 15:59:02 +0000 (16:59 +0100)
committerChristophe Romain <christophe.romain@process-one.net>
Tue, 22 Nov 2016 15:59:02 +0000 (16:59 +0100)
src/mod_roster_mnesia.erl
src/mod_roster_riak.erl

index 1a33407e17eeea9f33d790a0b6466bbc0236aa75..e274ac5ebcbcfdaca018d8db2ed9815a5192086d 100644 (file)
@@ -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
index 53f0e7fb4ba309ad6e55f273922080a6ea1403b5..40992d77d65f406fc863961014f3374b0abe8659 100644 (file)
@@ -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) ->