mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-30 17:43:57 +01:00
Handle correctly case where ExtraUsername is empty
This commit is contained in:
parent
c5a06e9d06
commit
8761e6e0e0
@ -420,9 +420,9 @@ make_sql_query(User, LServer, MAMQuery, RSM, ExtraUsernames) ->
|
|||||||
|
|
||||||
{UserSel, UserWhere} = case ExtraUsernames of
|
{UserSel, UserWhere} = case ExtraUsernames of
|
||||||
Users when is_list(Users) ->
|
Users when is_list(Users) ->
|
||||||
EscUsers = [<<"'", (Escape(U))/binary, "'">> || U <- Users],
|
EscUsers = [<<"'", (Escape(U))/binary, "'">> || U <- [SUser | Users]],
|
||||||
{<<" username,">>,
|
{<<" username,">>,
|
||||||
[<<" username in ('">>, SUser, <<"',">>, str:join(EscUsers, <<",">>), <<")">>]};
|
[<<" username in (">>, str:join(EscUsers, <<",">>), <<")">>]};
|
||||||
subscribers_table ->
|
subscribers_table ->
|
||||||
SJid = jid:encode({User, LServer, <<>>}),
|
SJid = jid:encode({User, LServer, <<>>}),
|
||||||
{<<" username,">>,
|
{<<" username,">>,
|
||||||
|
Loading…
Reference in New Issue
Block a user