1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(history): select only pending history for the requested friend

This commit is contained in:
Anthony Bilinski 2019-08-08 21:06:42 -07:00
parent 9734de6f8a
commit 64aa3eae4d
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -612,9 +612,10 @@ QList<History::HistMessage> History::getUnsentMessagesForFriend(const ToxPk& fri
"aliases.display_name, sender.public_key, message "
"FROM history "
"JOIN faux_offline_pending ON history.id = faux_offline_pending.id "
"JOIN peers chat on chat.public_key = '%1' "
"JOIN peers chat on history.chat_id = chat.id "
"JOIN aliases on sender_alias = aliases.id "
"JOIN peers sender on aliases.owner = sender.id;")
"JOIN peers sender on aliases.owner = sender.id "
"WHERE chat.public_key='%1';")
.arg(friendPk.toString());
QList<History::HistMessage> ret;