mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
pass dispatcher through to electron, on a whitelist basis
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a9b5282ba3
commit
755c66b9f1
@ -54,7 +54,19 @@ function platformFriendlyName(): string {
|
||||
}
|
||||
}
|
||||
|
||||
function _onAction(payload: Object) {
|
||||
// Whitelist payload actions, no point sending most across
|
||||
if (['call_state'].includes(payload.action)) {
|
||||
ipcRenderer.send('app_onAction', payload);
|
||||
}
|
||||
}
|
||||
|
||||
export default class ElectronPlatform extends VectorBasePlatform {
|
||||
constructor() {
|
||||
super();
|
||||
dis.register(_onAction);
|
||||
}
|
||||
|
||||
setNotificationCount(count: number) {
|
||||
if (this.notificationCount === count) return;
|
||||
super.setNotificationCount(count);
|
||||
|
Loading…
Reference in New Issue
Block a user