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.
16 lines
444 B
JavaScript
16 lines
444 B
JavaScript
"use strict";
|
|
|
|
const either = require("@validatem/either");
|
|
|
|
const isRoomEvent = require("../is-room-event");
|
|
const isStateEvent = require("../is-state-event");
|
|
|
|
// State events are a more specific version of room events: https://github.com/matrix-org/matrix-doc/issues/2681
|
|
module.exports = function (strict = false, extraFields = {}) {
|
|
return either([
|
|
[ isRoomEvent(strict, extraFields) ],
|
|
[ isStateEvent(strict, extraFields) ]
|
|
]);
|
|
};
|
|
|