notifications: Send message received from desktop app notification reply.

Adds a electron_bridge event that takes in message id and reply recived from
the notification reply and sends a message. We do this in webapp so desktop
doesn't have to depend on narrow and channel modules.

We also modify zjunit to reset window.electron_bridge after every run
to avoid leaking it.
This commit is contained in:
Priyank Patel
2019-07-16 00:52:55 +00:00
committed by Tim Abbott
parent ba7a0934e3
commit e69c2f1aa2
2 changed files with 41 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ exports.restore = function () {
delete require.cache[require.resolve(fn)];
});
dependencies = [];
delete global.window.electron_bridge;
_.extend(global, old_builtins);
old_builtins = {};
};