Skip purge of messages with pending operations

This commit is contained in:
M66B 2023-09-09 19:13:42 +02:00
parent 65ca2958c9
commit a8517e1537
1 changed files with 3 additions and 3 deletions

View File

@ -652,9 +652,9 @@ public interface DaoMessage {
@Query("SELECT uid FROM message" +
" WHERE folder = :folder" +
" AND NOT ui_busy IS NULL" +
" AND ui_busy > :time" +
" AND NOT uid IS NULL")
" AND NOT uid IS NULL" +
" AND ((NOT ui_busy IS NULL AND ui_busy > :time)" +
" OR (EXISTS (SELECT * FROM operation WHERE operation.id = message.id)))")
List<Long> getBusyUids(long folder, long time);
@Query("SELECT id, uidl, msgid, ui_hide, ui_busy, ui_flagged FROM message" +