Fixes silenced notification preventing notification prompt to be shown (#9336)
This commit is contained in:
parent
a704a2fbb7
commit
c2e2f406af
7 changed files with 10 additions and 75 deletions
|
@ -18,9 +18,16 @@ import { _t } from "../languageHandler";
|
|||
import Notifier from "../Notifier";
|
||||
import GenericToast from "../components/views/toasts/GenericToast";
|
||||
import ToastStore from "../stores/ToastStore";
|
||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||
import { getLocalNotificationAccountDataEventType } from "../utils/notifications";
|
||||
|
||||
const onAccept = () => {
|
||||
Notifier.setEnabled(true);
|
||||
const cli = MatrixClientPeg.get();
|
||||
const eventType = getLocalNotificationAccountDataEventType(cli.deviceId);
|
||||
cli.setAccountData(eventType, {
|
||||
is_silenced: false,
|
||||
});
|
||||
};
|
||||
|
||||
const onReject = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue