mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
PubSub: add correct order when requesting all items
This commit is contained in:
parent
07a193d4dc
commit
d120e0ad91
@ -651,7 +651,8 @@ get_items(Nidx, _From, undefined) ->
|
||||
SNidx = misc:i2l(Nidx),
|
||||
case ejabberd_sql:sql_query_t(
|
||||
[<<"select itemid, publisher, creation, modification, payload",
|
||||
" from pubsub_item where nodeid='", SNidx/binary, "'">>]) of
|
||||
" from pubsub_item where nodeid='", SNidx/binary, "'",
|
||||
" order by creation asc">>]) of
|
||||
{selected, _, AllItems} ->
|
||||
Count = length(AllItems),
|
||||
if Count =< ?MAXITEMS ->
|
||||
|
Loading…
Reference in New Issue
Block a user