MM-53340 - Create registerDesktopNotificationHook for plugins, e.g. Calls (#23884)

* calls will notify in GM/DM channels for call started posts

* fix types

* add registerDesktopNotificationHook

* remove callsWillNotify

* cleanup unused types

* use an args object to shorten params

* add CUSTOM_CALLS_RECORDING to constants
Этот коммит содержится в:
Christopher Poile
2023-07-11 22:46:59 -04:00
коммит произвёл GitHub
родитель f45f774ece
Коммит 46a659e06d
10 изменённых файлов: 405 добавлений и 16 удалений

Просмотреть файл

@@ -10,7 +10,8 @@ export function isCallsEnabled(state: GlobalState, minVersion = '0.4.2') {
semver.gte(state.plugins.plugins[suitePluginIds.calls].version || '0.0.0', minVersion));
}
export function isCallsRingingEnabled(state: GlobalState) {
// isCallsRingingEnabledOnServer is the flag for the ringing/notification feature in calls
export function isCallsRingingEnabledOnServer(state: GlobalState) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
return Boolean(state[`plugins-${suitePluginIds.calls}`]?.callsConfig?.EnableRinging);