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
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) ->