24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00

First delete messages, and then get the remaining messages

This commit is contained in:
Badlop 2011-04-11 13:14:30 +02:00
parent 191187a279
commit b684e90292

View File

@ -597,12 +597,12 @@ user_queue(User, Server, Query, Lang) ->
exmpp_stringprep:nodeprep(list_to_binary(User)),
exmpp_stringprep:nameprep(list_to_binary(Server))
},
{US, MsgsAll, Res} = try
{US, Res, MsgsAll} = try
{
US0,
user_queue_parse_query(US0, Query),
lists:keysort(#offline_msg.timestamp,
gen_storage:dirty_read(Server, {offline_msg, US0})),
user_queue_parse_query(US0, Query)
gen_storage:dirty_read(Server, {offline_msg, US0}))
}
catch
_ ->