diff --git a/ConversationsClassic/AppCore/Middlewares/DatabaseMiddleware.swift b/ConversationsClassic/AppCore/Middlewares/DatabaseMiddleware.swift index 3ab5f47..ea61c49 100644 --- a/ConversationsClassic/AppCore/Middlewares/DatabaseMiddleware.swift +++ b/ConversationsClassic/AppCore/Middlewares/DatabaseMiddleware.swift @@ -275,7 +275,7 @@ private extension DatabaseMiddleware { .tracking( Message .filter( - Column("to") == chat.account || + (Column("to") == chat.account && Column("from") == chat.participant) || (Column("from") == chat.account && Column("to") == chat.participant) ) .order(Column("date").desc)