Merge pull request #3716 from matrix-org/travis/mjolnir-render

Render policy room event updates in the timeline
This commit is contained in:
Travis Ralston 2019-12-11 10:50:27 -07:00 committed by GitHub
commit 633aa59e6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 110 additions and 0 deletions

View file

@ -34,6 +34,7 @@ import SettingsStore from "../../../settings/SettingsStore";
import {EventStatus, MatrixClient} from 'matrix-js-sdk';
import {formatTime} from "../../../DateUtils";
import MatrixClientPeg from '../../../MatrixClientPeg';
import {ALL_RULE_TYPES} from "../../../mjolnir/BanList";
const ObjectUtils = require('../../../ObjectUtils');
@ -69,6 +70,11 @@ const stateEventTileTypes = {
'm.room.related_groups': 'messages.TextualEvent',
};
// Add all the Mjolnir stuff to the renderer
for (const evType of ALL_RULE_TYPES) {
stateEventTileTypes[evType] = 'messages.TextualEvent';
}
function getHandlerTile(ev) {
const type = ev.getType();