feat: In teamprofiles, don't mark chat as read on outgoing message (#7717)

Fix https://github.com/chatmail/core/issues/7704
This commit is contained in:
Hocuri
2026-01-19 12:39:06 +01:00
committed by GitHub
parent b2f31c8148
commit c3a5e3ac0d
3 changed files with 45 additions and 2 deletions

View File

@@ -3305,6 +3305,10 @@ pub(crate) async fn mark_old_messages_as_noticed(
context: &Context,
mut msgs: Vec<ReceivedMsg>,
) -> Result<()> {
if context.get_config_bool(Config::TeamProfile).await? {
return Ok(());
}
msgs.retain(|m| m.state.is_outgoing());
if msgs.is_empty() {
return Ok(());

View File

@@ -1140,7 +1140,6 @@ impl Session {
/// Stores pending `\Seen` flags for messages in `imap_markseen` table.
pub(crate) async fn store_seen_flags_on_imap(&mut self, context: &Context) -> Result<()> {
if context.get_config_bool(Config::TeamProfile).await? {
info!(context, "Team profile, skipping seen flag synchronization.");
return Ok(());
}
@@ -1216,7 +1215,6 @@ impl Session {
}
if context.get_config_bool(Config::TeamProfile).await? {
info!(context, "Team profile, skipping seen flag synchronization.");
return Ok(());
}