From 568cf9d55f5c1028d26ebe62554aca6446afd294 Mon Sep 17 00:00:00 2001 From: luciajanikova <19lucia99@gmail.com> Date: Wed, 13 Nov 2024 11:23:46 +0100 Subject: [PATCH] Do not download related messages to drafts --- app/jobs/fs/sync_box_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/fs/sync_box_job.rb b/app/jobs/fs/sync_box_job.rb index 1bfa355f..4ff4065e 100644 --- a/app/jobs/fs/sync_box_job.rb +++ b/app/jobs/fs/sync_box_job.rb @@ -4,7 +4,7 @@ def perform(box, from: Date.today - 1.week, to: Date.tomorrow) raise unless box.is_a?(Fs::Box) return unless box.syncable? - box.messages.outbox.find_each do |outbox_message| + box.messages.outbox.where(type: [nil, 'Message']).find_each do |outbox_message| DownloadSentMessageRelatedMessagesJob.perform_later(outbox_message, from: from, to: to) end end