Commit 6105af8d 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 ed02705c
......@@ -70,7 +70,7 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene
"INSERT INTO ofOffline (username, messageID, creationDate, messageSize, stanza) " +
"VALUES (?, ?, ?, ?, ?)";
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 =
"SELECT stanza FROM ofOffline WHERE username=? AND creationDate=?";
private static final String SELECT_SIZE_OFFLINE =
......@@ -526,4 +526,4 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene
}
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