Ignore sent items when fetching threads
- Deciders: Julian Bäume
- Date: 2025-06-10
Status
Proposed
Context
Initially it was planned to import all emails related to a thread, including sent items into the database. When replying to a thread from the Teams app, we want to show it as a dedicated action in the thread view. While technically this works fine, the dates can be slightly off, depending on the clocks of the servers involved. The idea now is to ignore sent items, assuming that users will not answer "off band" to a thread, or that at least the sent item should not be shown in that case. As we know the cid of the sent mail, we can store it along the reply action and just use it to show the sent item based on the reply action instead of an imported email. This simplifies the code as we don't need to trigger a resync for example.
Decision
We will ignore sent items when syncing mails in threads.
Consequences
Emails send "off band", i.e. not from the Teams app, will not be shown in the thread view. The same applies to sent emails that were present before the initial sync, but fetching those could even be considered at some point in the future.

