mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 07:36:12 +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() {
|
_renderSenderResponse() {
|
||||||
const { icsEvent } = this.state;
|
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.email);
|
||||||
const sender = CalendarUtils.cleanParticipants(icsEvent).find(p => p.email === from);
|
|
||||||
if (!sender) return false;
|
if (!sender) return false;
|
||||||
|
|
||||||
const verb: { [key: string]: string } = {
|
const verb: { [key: string]: string } = {
|
||||||
|
@ -162,7 +163,9 @@ export class EventHeader extends React.Component<EventHeaderProps, EventHeaderSt
|
||||||
COMPLETED: localized('completed'),
|
COMPLETED: localized('completed'),
|
||||||
}[sender.status];
|
}[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() {
|
_renderRSVP() {
|
||||||
|
|
Loading…
Reference in a new issue