You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
385 B
JavaScript

"use strict";
const matchValue = require("match-value");
const addCommonFields = require("../event-add-common-fields");
module.exports = function mapGuestAccessEvent(event, _context) {
return addCommonFields(event, {
type: "guestAccessChanged",
sender: event.sender,
guestsCanJoin: matchValue(event.content.guest_access, {
can_join: true,
forbidden: false
})
});
};