Philipp Hörist pushed to branch master at gajim / gajim


Commits:
b365f1e4 by Philipp Hörist at 2024-06-25T23:51:15+02:00
fix: Corrections: Load correct message

Fixes #11883

- - - - -


1 changed file:

- gajim/common/storage/archive/storage.py


Changes:

=====================================
gajim/common/storage/archive/storage.py
=====================================
@@ -595,9 +595,7 @@ def get_last_correctable_message(
     ) -> Message | None:
         '''
         Load the last correctable message of a conversation by message_id.
-        Conditions: max 5 min old
         '''
-        # TODO this could match multiple rows, better is to search with the pk
 
         fk_account_pk = self._get_account_pk(session, account)
         fk_remote_pk = self._get_jid_pk(session, jid)
@@ -612,6 +610,7 @@ def get_last_correctable_message(
                 Message.id == message_id,
                 Message.fk_remote_pk == fk_remote_pk,
                 Message.fk_account_pk == fk_account_pk,
+                Message.direction == ChatDirection.OUTGOING,
                 Message.timestamp > min_time,
                 Message.state == MessageState.ACKNOWLEDGED,
             )



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/b365f1e4c235c707af49417c07b49007e632438b

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/b365f1e4c235c707af49417c07b49007e632438b
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to