Fix StubRoom for react-sdk tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-07-29 13:18:02 +01:00
parent 856e161c8b
commit f45b1bfdda
2 changed files with 2 additions and 1 deletions

View file

@ -46,7 +46,6 @@ export default class MessageActionBar extends React.PureComponent {
this.props.mxEvent.on("Event.decrypted", this.onDecrypted); this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
if (room) { if (room) {
console.log("DEBUG", room);
room.on("RoomMember.powerLevel", this.onPermissionsChange); room.on("RoomMember.powerLevel", this.onPermissionsChange);
room.on("RoomMember.membership", this.onPermissionsChange); room.on("RoomMember.membership", this.onPermissionsChange);
this.onPermissionsChange(); this.onPermissionsChange();

View file

@ -259,6 +259,8 @@ export function mkStubRoom(roomId = null) {
}, },
}, },
setBlacklistUnverifiedDevices: sinon.stub(), setBlacklistUnverifiedDevices: sinon.stub(),
on: sinon.stub(),
removeListener: sinon.stub(),
}; };
} }