mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-16 15:52:25 +03:00
adjust to reflect using the service worker to actually toggle
This commit is contained in:
parent
129599572d
commit
a02a10eda1
1 changed files with 5 additions and 20 deletions
|
@ -177,9 +177,8 @@ export async function togglePusher(
|
|||
const { pushers } = await mx.getPushers();
|
||||
const existingPusher = pushers.find((p) => p.pushkey === p256dhKey);
|
||||
|
||||
if (existingPusher && existingPusher.kind === 'http') {
|
||||
if (visible) {
|
||||
/*
|
||||
if (visible) {
|
||||
/*
|
||||
Need to clean up the old push rules I made
|
||||
The push rules should be removed upon roomId change
|
||||
and a new one added for the NEW current room
|
||||
|
@ -203,22 +202,8 @@ export async function togglePusher(
|
|||
Instead we'll do a hackier bypass, but only Cinny will acknowledge this as the client is responsible
|
||||
for handling the sounds themselves. This is more or less a custom tweak still.
|
||||
*/
|
||||
mx.addPushRule('global', PushRuleKind.Override, `${MUTE_RULE_ID}`, {
|
||||
conditions: [],
|
||||
actions: [
|
||||
PushRuleActionName.DontNotify,
|
||||
{
|
||||
set_tweak: TweakName.Sound,
|
||||
value: 'cinny_show_banner',
|
||||
},
|
||||
{
|
||||
set_tweak: TweakName.Highlight,
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
} else {
|
||||
await mx.deletePushRule('global', PushRuleKind.Override, `${MUTE_RULE_ID}`);
|
||||
}
|
||||
disablePushNotifications(mx, clientConfig);
|
||||
} else {
|
||||
enablePushNotifications(mx, clientConfig);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue