mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-16 00:21:30 +03:00
Don't show Matrix-namespaced push rules which the server doesn't declare
So that users can't change push rules they don't have. Similar to the behaviour in https://github.com/matrix-org/matrix-js-sdk/pull/860
This commit is contained in:
parent
8d8445429c
commit
e5059fdf0f
1 changed files with 4 additions and 0 deletions
|
@ -704,6 +704,10 @@ module.exports = React.createClass({
|
||||||
const rows = [];
|
const rows = [];
|
||||||
for (const i in this.state.vectorPushRules) {
|
for (const i in this.state.vectorPushRules) {
|
||||||
const rule = this.state.vectorPushRules[i];
|
const rule = this.state.vectorPushRules[i];
|
||||||
|
if (rule.rule === undefined && rule.vectorRuleId.startsWith(".m.")) {
|
||||||
|
console.warn(`Skipping render of rule ${rule.vectorRuleId} due to no underlying rule`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//console.log("rendering: " + rule.description + ", " + rule.vectorRuleId + ", " + rule.vectorState);
|
//console.log("rendering: " + rule.description + ", " + rule.vectorRuleId + ", " + rule.vectorState);
|
||||||
rows.push(this.renderNotifRulesTableRow(rule.description, rule.vectorRuleId, rule.vectorState));
|
rows.push(this.renderNotifRulesTableRow(rule.description, rule.vectorRuleId, rule.vectorState));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue