PostgreSqlStorage: Fix apparently-incorrect index in requestAllMsgs
[quassel.git] / src / core / postgresqlstorage.cpp
index acb7f37..8ee24d4 100644 (file)
@@ -1601,7 +1601,7 @@ QList<Message> 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()],