mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
Sentry fix: Only display sender responses inline if the email has a From: line
This commit is contained in:
parent
67605e983f
commit
5bb9e80404
1 changed files with 6 additions and 3 deletions
|
@ -149,9 +149,10 @@ export class EventHeader extends React.Component<EventHeaderProps, EventHeaderSt
|
|||
|
||||
_renderSenderResponse() {
|
||||
const { icsEvent } = this.state;
|
||||
const from = this.props.message.from[0];
|
||||
if (!from) return false;
|
||||
|
||||
const from = this.props.message.from[0].email;
|
||||
const sender = CalendarUtils.cleanParticipants(icsEvent).find(p => p.email === from);
|
||||
const sender = CalendarUtils.cleanParticipants(icsEvent).find(p => p.email === from.email);
|
||||
if (!sender) return false;
|
||||
|
||||
const verb: { [key: string]: string } = {
|
||||
|
@ -162,7 +163,9 @@ export class EventHeader extends React.Component<EventHeaderProps, EventHeaderSt
|
|||
COMPLETED: localized('completed'),
|
||||
}[sender.status];
|
||||
|
||||
return <div className="event-actions">{localized(`%1$@ has %2$@ this event`, from, verb)}</div>;
|
||||
return (
|
||||
<div className="event-actions">{localized(`%1$@ has %2$@ this event`, from.email, verb)}</div>
|
||||
);
|
||||
}
|
||||
|
||||
_renderRSVP() {
|
||||
|
|
Loading…
Reference in a new issue