Adapt Membership usage for the change to an enum KnownMembership

This commit is contained in:
Andy Balaam 2024-03-12 14:52:54 +00:00
parent da99bad7b9
commit 34559d2a89
115 changed files with 764 additions and 593 deletions

View file

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { KnownMembership } from "matrix-js-sdk/src/matrix";
import type { Page } from "@playwright/test";
import { test, expect } from "../../element-web-test";
import {
@ -87,7 +89,7 @@ const bobJoin = async (page: Page, bob: Bot) => {
async function autoJoin(client: Client) {
await client.evaluate((cli) => {
cli.on(window.matrixcs.RoomMemberEvent.Membership, (event, member) => {
if (member.membership === Membership.Invite && member.userId === cli.getUserId()) {
if (member.membership === KnownMembership.Invite && member.userId === cli.getUserId()) {
cli.joinRoom(member.roomId);
}
});