mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
Save notification filter
This commit is contained in:
parent
8ec03c2dc6
commit
b6fed711c6
@ -483,11 +483,12 @@ export class AdminRoom extends EventEmitter {
|
|||||||
}
|
}
|
||||||
if (this.notifFilter.forNotifications.has(name)) {
|
if (this.notifFilter.forNotifications.has(name)) {
|
||||||
this.notifFilter.forNotifications.delete(name);
|
this.notifFilter.forNotifications.delete(name);
|
||||||
return this.sendNotice(`Filter "${name}" disabled for notifications`);
|
await this.sendNotice(`Filter "${name}" disabled for notifications`);
|
||||||
} else {
|
} else {
|
||||||
this.notifFilter.forNotifications.add(name);
|
this.notifFilter.forNotifications.add(name);
|
||||||
return this.sendNotice(`Filter "${name}" enabled for notifications`);
|
await this.sendNotice(`Filter "${name}" enabled for notifications`);
|
||||||
}
|
}
|
||||||
|
await this.botIntent.underlyingClient.sendStateEvent(this.roomId, NotifFilter.StateType, "", this.notifFilter.getStateContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async saveAccountData(updateFn: (record: AdminAccountData) => AdminAccountData) {
|
private async saveAccountData(updateFn: (record: AdminAccountData) => AdminAccountData) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user