Merge branch 'hs/custom-notif-sounds' of github.com:Half-Shot/matrix-react-sdk into hs/custom-notif-sounds
This commit is contained in:
commit
874b61e451
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ const Notifier = {
|
||||||
|
|
||||||
_playAudioNotification: async function(ev, room) {
|
_playAudioNotification: async function(ev, room) {
|
||||||
const sound = SettingsStore.isFeatureEnabled("feature_notification_sounds") ? await this.getSoundForRoom(room.roomId) : null;
|
const sound = SettingsStore.isFeatureEnabled("feature_notification_sounds") ? await this.getSoundForRoom(room.roomId) : null;
|
||||||
console.log(`Got sound ${sound.name || "default"} for ${room.roomId}`);
|
console.log(`Got sound ${sound && sound.name || "default"} for ${room.roomId}`);
|
||||||
// XXX: How do we ensure this is a sound file and not going to be exploited?
|
// XXX: How do we ensure this is a sound file and not going to be exploited?
|
||||||
try {
|
try {
|
||||||
const selector = document.querySelector(sound ? `audio[src='${sound.url}']` : "#messageAudio");
|
const selector = document.querySelector(sound ? `audio[src='${sound.url}']` : "#messageAudio");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue