From: Michael Marley Date: Tue, 27 Mar 2018 23:41:28 +0000 (-0400) Subject: PostgreSqlStorage: Fix apparently-incorrect index in requestAllMsgs X-Git-Tag: travis-deploy-test~139 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=3bf86a5278e26bec5e708a566e6926125f1941f0 PostgreSqlStorage: Fix apparently-incorrect index in requestAllMsgs This function was using 1 for its date index, which is the same index as was used for bufferid. The correct index to use is 2. Closes GH-346. --- diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index 955253b7..715442dc 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -1685,7 +1685,7 @@ QList PostgreSqlStorage::requestAllMsgs(UserId user, MsgId first, MsgId QDateTime timestamp; for (int i = 0; i < limit && query.next(); i++) { - timestamp = query.value(1).toDateTime(); + timestamp = query.value(2).toDateTime(); timestamp.setTimeSpec(Qt::UTC); Message msg(timestamp, bufferInfoHash[query.value(1).toInt()],