Save notification filter

This commit is contained in:
Will Hunt 2021-04-11 21:25:34 +01:00
parent 8ec03c2dc6
commit b6fed711c6

View File

@ -483,11 +483,12 @@ export class AdminRoom extends EventEmitter {
}
if (this.notifFilter.forNotifications.has(name)) {
this.notifFilter.forNotifications.delete(name);
return this.sendNotice(`Filter "${name}" disabled for notifications`);
await this.sendNotice(`Filter "${name}" disabled for notifications`);
} else {
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) {