1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-05 17:02:07 +03:00

pick the first member, dont need an array

This commit is contained in:
Bruno Windels
2018-09-04 13:00:00 +02:00
parent 2391ce198d
commit 632e4aa120

View File

@@ -310,7 +310,7 @@ Room.prototype.guessDMUserId = function() {
return this._summaryHeroes[0];
}
const members = this.currentState.getMembers();
const anyMember = members.filter((m) => m.userId !== this.myUserId);
const anyMember = members.find((m) => m.userId !== this.myUserId);
if (anyMember) {
}
const createEvent = this.currentState.getStateEvents("m.room.create", "");