fix: trust an invitation only on checks aligned with its sender and stop flagging colleagues' invitations

This commit is contained in:
Linus Rath
2026-10-29 03:22:46 +01:00
parent 4de856923b
commit 7a95d43f1a
3 changed files with 122 additions and 15 deletions
@@ -156,8 +156,8 @@ export function CalendarInvitationBanner({ email, jmapAccountId }: Props) {
}, [storeEvents, event?.uid, serverMatch]);
const trust = React.useMemo(
() => (event ? getInvitationTrustAssessment(event, email, method) : null),
[event, email, method],
() => (event ? getInvitationTrustAssessment(event, email, method, currentUserEmails) : null),
[event, email, method, currentUserEmails],
);
if (!attachment || !enabled || state === 'error') return null;