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

fix(history): Fix alias removal SQL query after group history addition

This commit is contained in:
Anthony Bilinski 2022-03-30 20:41:28 -07:00
parent c5fdb78676
commit 4f45f30ef9
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -315,8 +315,9 @@ void History::removeChatHistory(const ChatId& chatId)
queryString += QStringLiteral("; "
"DELETE FROM aliases WHERE id NOT IN ( "
" SELECT DISTINCT sender_alias FROM "
" text_messages JOIN file_transfers);");
" SELECT DISTINCT sender_alias FROM text_messages "
" UNION "
" SELECT DISTINCT sender_alias FROM file_transfers);");
queryString += QStringLiteral(
"DELETE FROM authors WHERE id NOT IN ( "