don't NPE on invites from Dendrite
parent
347e3a0dd0
commit
ad2f704e76
|
@ -1717,8 +1717,11 @@ export default createReactClass({
|
||||||
} else {
|
} else {
|
||||||
const myUserId = this.context.credentials.userId;
|
const myUserId = this.context.credentials.userId;
|
||||||
const myMember = this.state.room.getMember(myUserId);
|
const myMember = this.state.room.getMember(myUserId);
|
||||||
const inviteEvent = myMember.events.member;
|
const inviteEvent = myMember ? myMember.events.member : null;
|
||||||
var inviterName = inviteEvent.sender ? inviteEvent.sender.name : inviteEvent.getSender();
|
let inviterName = _t("Unknown");
|
||||||
|
if (inviteEvent) {
|
||||||
|
inviterName = inviteEvent.sender ? inviteEvent.sender.name : inviteEvent.getSender();
|
||||||
|
}
|
||||||
|
|
||||||
// We deliberately don't try to peek into invites, even if we have permission to peek
|
// We deliberately don't try to peek into invites, even if we have permission to peek
|
||||||
// as they could be a spam vector.
|
// as they could be a spam vector.
|
||||||
|
|
Loading…
Reference in New Issue