From 79853ad44fafd9d8120ad38049200c58e36f20b9 Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Wed, 2 Mar 2016 02:00:02 +0300 Subject: [PATCH] Missed a few calls in previous commits --- src/mod_roster.erl | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 79655af8a..997544b1e 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -645,14 +645,8 @@ get_subscription_lists(_, LUser, LServer, mnesia) -> _ -> [] end; get_subscription_lists(_, LUser, LServer, odbc) -> - Username = ejabberd_odbc:escape(LUser), - case catch odbc_queries:get_roster(LServer, Username) of - {selected, - [<<"username">>, <<"jid">>, <<"nick">>, - <<"subscription">>, <<"ask">>, <<"askmessage">>, - <<"server">>, <<"subscribe">>, <<"type">>], - Items} - when is_list(Items) -> + case catch odbc_queries:get_roster(LServer, LUser) of + {selected, Items} when is_list(Items) -> lists:map(fun(I) -> raw_to_record(LServer, I) end, Items); _ -> [] end; @@ -1149,14 +1143,8 @@ get_in_pending_subscriptions(Ls, User, Server, odbc) -> JID = jid:make(User, Server, <<"">>), LUser = JID#jid.luser, LServer = JID#jid.lserver, - Username = ejabberd_odbc:escape(LUser), - case catch odbc_queries:get_roster(LServer, Username) of - {selected, - [<<"username">>, <<"jid">>, <<"nick">>, - <<"subscription">>, <<"ask">>, <<"askmessage">>, - <<"server">>, <<"subscribe">>, <<"type">>], - Items} - when is_list(Items) -> + case catch odbc_queries:get_roster(LServer, LUser) of + {selected, Items} when is_list(Items) -> Ls ++ lists:map(fun (R) -> Message = R#roster.askmessage, -- 2.40.0