1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00
To make tests pass again
This commit is contained in:
David Baker
2018-08-30 12:03:53 +01:00
parent 1cbcc61bd6
commit 60c01d7869
2 changed files with 3 additions and 6 deletions

View File

@@ -667,7 +667,7 @@ describe("Room", function() {
const roomName = "flibble";
const event = addMember(userA, "invite");
event.event.unsigned.invite_room_state = [
event.event.invite_room_state = [
{
type: "m.room.name",
state_key: "",
@@ -686,7 +686,7 @@ describe("Room", function() {
const roomName = "flibble";
setRoomName(roomName);
const roomNameToIgnore = "ignoreme";
event.event.unsigned.invite_room_state = [
event.event.invite_room_state = [
{
type: "m.room.name",
state_key: "",

View File

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