25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Fix get_roster issue injected by fbfbb96

This commit is contained in:
Christophe Romain 2016-11-22 16:59:02 +01:00
parent 24ef90c556
commit 9ab169bc63
2 changed files with 3 additions and 3 deletions

View 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

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