Display OS notifications when receiving a notification on CryptPad

This commit is contained in:
yflory
2019-09-09 17:37:11 +02:00
parent d993827c7e
commit b84c4be69c
4 changed files with 27 additions and 11 deletions

View File

@@ -414,8 +414,12 @@ define([
});
});
Cryptpad.mailbox.onEvent.reg(function (data) {
sframeChan.event('EV_MAILBOX_EVENT', data);
Cryptpad.mailbox.onEvent.reg(function (data, cb) {
sframeChan.query('EV_MAILBOX_EVENT', data, function (err, obj) {
if (!cb) { return; }
if (err) { return void cb({error: err}); }
cb(obj);
});
});
sframeChan.on('Q_MAILBOX_COMMAND', function (data, cb) {
Cryptpad.mailbox.execCommand(data, cb);