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
376 B
JavaScript
17 lines
376 B
JavaScript
3 years ago
|
"use strict";
|
||
|
|
||
|
const matchValue = require("match-value");
|
||
|
|
||
|
const addCommonFields = require("../event-add-common-fields");
|
||
|
|
||
|
module.exports = function mapJoinRulesEvent(event, _context) {
|
||
|
return addCommonFields(event, {
|
||
|
type: "joinRuleChanged",
|
||
|
sender: event.sender,
|
||
|
access: matchValue(event.content.join_rule, {
|
||
|
public: "public",
|
||
|
invite: "inviteOnly"
|
||
|
})
|
||
|
});
|
||
|
};
|