Refactor contacts/messenger so that it is usable directly in the apps

This commit is contained in:
yflory
2018-09-06 18:41:22 +02:00
parent 2f3576f90e
commit e6743887fc
17 changed files with 1013 additions and 565 deletions

View File

@@ -776,6 +776,14 @@ define([
Cryptpad.messenger.setChannelHead(opt, cb);
});
sframeChan.on('Q_CHAT_COMMAND', function (data, cb) {
Cryptpad.messenger.execCommand(data, cb);
});
Cryptpad.messenger.onEvent.reg(function (data) {
console.log(data);
sframeChan.event('EV_CHAT_EVENT', data);
});
Cryptpad.messenger.onMessageEvent.reg(function (data) {
sframeChan.event('EV_CONTACTS_MESSAGE', data);
});