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.
18 lines
499 B
JavaScript
18 lines
499 B
JavaScript
3 years ago
|
"use strict";
|
||
|
|
||
|
// FIXME: Tombstones
|
||
|
|
||
|
const defaultValue = require("default-value");
|
||
|
|
||
|
const addCommonFields = require("../event-add-common-fields");
|
||
|
|
||
|
module.exports = function mapRoomCreateEvent(event, _context) {
|
||
|
// FIXME: Redactable
|
||
|
return addCommonFields(event, {
|
||
|
type: "roomCreated",
|
||
|
sender: event.content.creator, // TODO: Verify that this is always equal to `event.sender`
|
||
|
isFederated: defaultValue(event.content["m.federate"], true),
|
||
|
roomVersion: event.content.room_version,
|
||
|
});
|
||
|
};
|