mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Groups -> Space consistency
This commit is contained in:
parent
f2ecc2ec33
commit
bd62c7cc60
@ -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) => {
|
||||
|
@ -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 (
|
Loading…
Reference in New Issue
Block a user