Groups -> Space consistency

This commit is contained in:
gnuxie 2022-08-16 16:10:52 +01:00
parent f2ecc2ec33
commit bd62c7cc60
2 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ export class Mjolnir {
* @param {string} options.managementRoom The room to report ignored invitations to if `recordIgnoredInvites` is true.
* @param {boolean} options.recordIgnoredInvites Whether to report invites that will be ignored to the `managementRoom`.
* @param {boolean} options.autojoinOnlyIfManager Whether to only accept an invitation by a user present in the `managementRoom`.
* @param {string} options.acceptInvitesFromGroup A group of users to accept invites from, ignores invites form users not in this group.
* @param {string} options.acceptInvitesFromSpace A space of users to accept invites from, ignores invites form users not in this space.
*/
private static addJoinOnInviteListener(mjolnir: Mjolnir, client: MatrixClient, options: { [key: string]: any }) {
client.on("room.invite", async (roomId: string, inviteEvent: any) => {

View File

@ -27,9 +27,9 @@ describe("Test: Accept Invites From Space", function() {
// we're mutating a static object, which may affect other tests :(
mjolnir.config.autojoinOnlyIfManager = false;
mjolnir.config.acceptInvitesFromGroup = space.roomId;
mjolnir.config.acceptInvitesFromSpace = space.roomId;
const promise = new Promise(async (resolve, reject) => {
const promise = new Promise(async resolve => {
const newRoomId = await client.createRoom({ invite: [mjolnirUserId] });
client.on("room.event", (roomId, event) => {
if (