mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-28 17:38:54 +01:00
Fix PubSub RSM on get_items (#1147)
This commit is contained in:
parent
7744339347
commit
95ff94b054
@ -686,13 +686,10 @@ get_items(Nidx, _From,
|
|||||||
#rsm_in{max = M, direction = Direction, id = I, index = IncIndex}) ->
|
#rsm_in{max = M, direction = Direction, id = I, index = IncIndex}) ->
|
||||||
Max = ejabberd_sql:escape(jlib:i2l(M)),
|
Max = ejabberd_sql:escape(jlib:i2l(M)),
|
||||||
{Way, Order} = case Direction of
|
{Way, Order} = case Direction of
|
||||||
% aft -> {<<"<">>, <<"desc">>};
|
aft when I == <<>> -> {<<"is not">>, <<"desc">>};
|
||||||
% before when I == <<>> -> {<<"is not">>, <<"asc">>};
|
aft -> {<<"<">>, <<"desc">>};
|
||||||
% before -> {<<">">>, <<"asc">>};
|
before when I == <<>> -> {<<"is not">>, <<"asc">>};
|
||||||
% _ when IncIndex =/= undefined ->
|
before -> {<<">">>, <<"asc">>}
|
||||||
% {<<"<">>, <<"desc">>}; % using index
|
|
||||||
_ ->
|
|
||||||
{<<"is not">>, <<"desc">>}% Can be better
|
|
||||||
end,
|
end,
|
||||||
SNidx = integer_to_binary(Nidx),
|
SNidx = integer_to_binary(Nidx),
|
||||||
[AttrName, Id] = case I of
|
[AttrName, Id] = case I of
|
||||||
|
Loading…
Reference in New Issue
Block a user