Merge pull request #2928 from Half-Shot/hs/custom-notif-sounds

Custom notification sounds for rooms
This commit is contained in:
Travis Ralston 2019-06-03 14:31:38 -06:00 committed by GitHub
commit 635b1ff612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 269 additions and 4 deletions

View file

@ -27,6 +27,7 @@ import LowBandwidthController from "./controllers/LowBandwidthController";
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
const LEVELS_ROOM_SETTINGS = ['device', 'room-device', 'room-account', 'account', 'config'];
const LEVELS_ROOM_OR_ACCOUNT = ['room-account', 'account'];
const LEVELS_ROOM_SETTINGS_WITH_ROOM = ['device', 'room-device', 'room-account', 'account', 'config', 'room'];
const LEVELS_ACCOUNT_SETTINGS = ['device', 'account', 'config'];
const LEVELS_FEATURE = ['device', 'config'];
@ -322,6 +323,10 @@ export const SETTINGS = {
default: false,
controller: new NotificationsEnabledController(),
},
"notificationSound": {
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
default: false,
},
"notificationBodyEnabled": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
default: true,