1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-13 19:42:25 +03:00
This commit is contained in:
Matthew Hodgson
2018-08-28 01:27:20 +01:00
parent a7199a3d0d
commit b0b0291bc7

View File

@@ -1141,7 +1141,10 @@ Room.prototype.recalculate = function() {
"m.room.member", this.myUserId,
);
if (membershipEvent && membershipEvent.getContent().membership === "invite") {
const strippedStateEvents = membershipEvent.event.invite_room_state || [];
const strippedStateEvents = (
membershipEvent.event.unsigned ?
membershipEvent.event.unsigned.invite_room_state :
[]) || [];
utils.forEach(strippedStateEvents, function(strippedEvent) {
const existingEvent = self.currentState.getStateEvents(
strippedEvent.type, strippedEvent.state_key,