Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(history): select only pending history for the requested friend
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybilinski committed Aug 29, 2019
1 parent 9734de6 commit 64aa3ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/persistence/history.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 64aa3ea

Please sign in to comment.