Unverified Commit 973179c3 authored by akrherz's avatar akrherz

OF-1223 sort load of ofOffline by date

This change ensures that messages are received in the order that they were originally sent to the user that was unavailable/offline.
parent e3373fc5
...@@ -70,7 +70,7 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene ...@@ -70,7 +70,7 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene
"INSERT INTO ofOffline (username, messageID, creationDate, messageSize, stanza) " + "INSERT INTO ofOffline (username, messageID, creationDate, messageSize, stanza) " +
"VALUES (?, ?, ?, ?, ?)"; "VALUES (?, ?, ?, ?, ?)";
private static final String LOAD_OFFLINE = private static final String LOAD_OFFLINE =
"SELECT stanza, creationDate FROM ofOffline WHERE username=?"; "SELECT stanza, creationDate FROM ofOffline WHERE username=? ORDER BY creationDate ASC";
private static final String LOAD_OFFLINE_MESSAGE = private static final String LOAD_OFFLINE_MESSAGE =
"SELECT stanza FROM ofOffline WHERE username=? AND creationDate=?"; "SELECT stanza FROM ofOffline WHERE username=? AND creationDate=?";
private static final String SELECT_SIZE_OFFLINE = private static final String SELECT_SIZE_OFFLINE =
...@@ -526,4 +526,4 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene ...@@ -526,4 +526,4 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene
} }
return true; return true;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment