Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(email): show "me" in soup email rows when all participants are the current user (#4896)

Evan Hutnik7572401bb797
diff --git a/apps/web/src/features/entity/extractors/entity-email-participants.tsx b/apps/web/src/features/entity/extractors/entity-email-participants.tsx
index e4436ef183..f5484f8b8a 100644
--- a/apps/web/src/features/entity/extractors/entity-email-participants.tsx
+++ b/apps/web/src/features/entity/extractors/entity-email-participants.tsx
@@ -101,14 +101,6 @@ function resolveParticipants(
): ResolvedParticipant[] {
if (!participants || participants.length === 0) return [];
- if (
- participants.length === 1 &&
- userEmail &&
- participants[0].email === userEmail
- ) {
- return [{ participant: participants[0], displayName: 'me' }];
- }
-
const seen = new Set<string>();
const result: ResolvedParticipant[] = [];
@@ -125,6 +117,13 @@ function resolveParticipants(
result.push({ participant, displayName });
}
+ // Every participant was the current user (self-to-self threads, or
+ // duplicate own-address rows from multi-inbox accounts) — show "me".
+ if (result.length === 0) {
+ const self = participants.find((p) => userEmail && p.email === userEmail);
+ if (self) return [{ participant: self, displayName: 'me' }];
+ }
+
return result;
}