Add a pad room when the messenger is active in a pad

This commit is contained in:
yflory
2018-09-07 19:35:06 +02:00
parent 9e27f111cb
commit d4dd58e7df
7 changed files with 202 additions and 75 deletions

View File

@@ -776,11 +776,19 @@ define([
Cryptpad.messenger.setChannelHead(opt, cb);
});
sframeChan.on('Q_CHAT_OPENPADCHAT', function (data, cb) {
Cryptpad.messenger.execCommand({
cmd: 'OPEN_PAD_CHAT',
data: {
channel: data,
secret: secret
}
}, 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);
});