mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 10:39:29 +02:00
Fix escaping for sql part of mamsub from muc mam
This commit is contained in:
parent
c7d04a82a2
commit
b071c4906f
1 changed files with 2 additions and 2 deletions
|
@ -420,11 +420,11 @@ make_sql_query(User, LServer, MAMQuery, RSM, ExtraUsernames) ->
|
|||
|
||||
{UserSel, UserWhere} = case ExtraUsernames of
|
||||
Users when is_list(Users) ->
|
||||
EscUsers = [<<"'", (Escape(U))/binary, "'">> || U <- [SUser | Users]],
|
||||
EscUsers = [<<"'", (Escape(U))/binary, "'">> || U <- [User | Users]],
|
||||
{<<" username,">>,
|
||||
[<<" username in (">>, str:join(EscUsers, <<",">>), <<")">>]};
|
||||
subscribers_table ->
|
||||
SJid = jid:encode({User, LServer, <<>>}),
|
||||
SJid = Escape(jid:encode({User, LServer, <<>>})),
|
||||
{<<" username,">>,
|
||||
[<<" (username = '">>, SUser, <<"'">>,
|
||||
<<" or username in (select concat(room, '@', host) ",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue