Push rule popup: respect custom sound action SFX

This commit is contained in:
miruka 2021-02-25 05:24:28 -04:00
parent 84567f1ffd
commit 41bce03b92

View File

@ -36,7 +36,12 @@ HFlickableColumnPopup {
undefined undefined
const actions = [] const actions = []
const sfx = soundCheck.checked ? "default": false const sfx =
soundCheck.checked && rule.sound ? rule.sound :
soundCheck.checked && rule.rule_id === ".m.rule.call" ? "ring" :
soundCheck.checked ? "default":
false
notifyCheck.checked && actions.push("notify") notifyCheck.checked && actions.push("notify")
actions.push({set_tweak: "highlight", value: highlightCheck.checked}) actions.push({set_tweak: "highlight", value: highlightCheck.checked})
actions.push({set_tweak: "bubble", value: bubbleCheck.checked}) actions.push({set_tweak: "bubble", value: bubbleCheck.checked})