BlueGit

ict rusty-teams

fix(chat): no-access notice without logging the raw conversation id

- Dropped the info log that printed the unmasked thread id
- Unused context parameter removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-16 · 2 weeks ago

Hash
a9797280a4deea47a8bd7a3d79d99676d7bb7ae8
Parent
3852683f
1 file changed +2 −8
crates/app/src/views/conversation.rs +2 −8
@@ -2230,7 +2230,7 @@ impl ConversationView {
2230 2230 }
2231 2231 self.mark_fetched_new(newest_cached, started_at, cx)
2232 2232 }
2233 Ok(Err(error)) if Self::denies_access(&error) => self.fail_access(generation, cx),
2233 Ok(Err(error)) if Self::denies_access(&error) => self.fail_access(generation),
2234 2234 Ok(Err(error)) => self.fail_sync(generation, short_error(&error), cx),
2235 2235 Err(error) => self.fail_sync(generation, short_error(&error), cx),
2236 2236 }
@@ -2268,13 +2268,7 @@ impl ConversationView {
2268 2268 matches!(error, teams_core::Error::Graph(graph::Error::NotAMember))
2269 2269 }
2270 2270
2271 fn fail_access(&mut self, generation: u64, _cx: &mut Context<Self>) {
2272 let conversation_id = self
2273 .current
2274 .as_ref()
2275 .map(|current| current.selection.conversation_id().to_owned())
2276 .unwrap_or_default();
2277 log::info!("chat access denied: {conversation_id} HTTP 403 AclCheckFailed");
2271 fn fail_access(&mut self, generation: u64) {
2278 2272 if let Some(sync) = self.sync_of(generation) {
2279 2273 sync.failed = true;
2280 2274 sync.receipts = false;
@@ -2230,7 +2230,7 @@ impl ConversationView {
2230 }
2230 }
2231 self.mark_fetched_new(newest_cached, started_at, cx)
2231 self.mark_fetched_new(newest_cached, started_at, cx)
2232 }
2232 }
2233 Ok(Err(error)) if Self::denies_access(&error) => self.fail_access(generation, cx),
2233 Ok(Err(error)) if Self::denies_access(&error) => self.fail_access(generation),
2234 Ok(Err(error)) => self.fail_sync(generation, short_error(&error), cx),
2234 Ok(Err(error)) => self.fail_sync(generation, short_error(&error), cx),
2235 Err(error) => self.fail_sync(generation, short_error(&error), cx),
2235 Err(error) => self.fail_sync(generation, short_error(&error), cx),
2236 }
2236 }
@@ -2268,13 +2268,7 @@ impl ConversationView {
2268 matches!(error, teams_core::Error::Graph(graph::Error::NotAMember))
2268 matches!(error, teams_core::Error::Graph(graph::Error::NotAMember))
2269 }
2269 }
2270
2270
2271 fn fail_access(&mut self, generation: u64, _cx: &mut Context<Self>) {
2271 fn fail_access(&mut self, generation: u64) {
2272 let conversation_id = self
2273 .current
2274 .as_ref()
2275 .map(|current| current.selection.conversation_id().to_owned())
2276 .unwrap_or_default();
2277 log::info!("chat access denied: {conversation_id} HTTP 403 AclCheckFailed");
2278 if let Some(sync) = self.sync_of(generation) {
2272 if let Some(sync) = self.sync_of(generation) {
2279 sync.failed = true;
2273 sync.failed = true;
2280 sync.receipts = false;
2274 sync.receipts = false;