Render policy room event updates in the timeline
Fixes https://github.com/matrix-org/mjolnir/issues/15 This should be completely safe to deploy, even without a labs flag, because policy rooms (ban lists) are usually only joined by the people who know what they are. This also has no relation to the Mjolnir functionality currently in Riot, though it does make seeing your ban list a bit less awkward. Ban list rules only show up in ban list rooms and rarely show up in public rooms, hence the somewhat vague messaging. It should be obvious that it's a ban list room due to the surrounding room decoration/purpose.
This commit is contained in:
parent
196d8fcd90
commit
f529a6c7a2
3 changed files with 110 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue