diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2017-09-27 11:12:01 +0200 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2017-09-27 11:12:01 +0200 |
commit | d120e0ad91b5398340d532b4da3f59acd556ff39 (patch) | |
tree | eda0af5ba19b7170dce9e0b86d7bd8e0547d526c | |
parent | PubSub: fix RSM support (#1994)(#2Â014) (diff) |
PubSub: add correct order when requesting all items
-rw-r--r-- | src/node_flat_sql.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_flat_sql.erl b/src/node_flat_sql.erl index 110e31092..0f9a64731 100644 --- a/src/node_flat_sql.erl +++ b/src/node_flat_sql.erl @@ -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 -> |