Pin the realtime channel in the OO apps

This commit is contained in:
yflory
2019-01-24 16:20:56 +01:00
parent 139b4608c0
commit 4946a44e33
2 changed files with 24 additions and 3 deletions

View File

@@ -56,7 +56,13 @@ define([
});
});
sframeChan.on('Q_OO_OPENCHANNEL', function (data, cb) {
console.log(data);
Cryptpad.getPadAttribute('rtChannel', function (err, res) {
// If already stored, don't pin it again
if (res && res === data.channel) { return; }
Cryptpad.pinPads([data.channel], function () {
Cryptpad.setPadAttribute('rtChannel', data.channel, function () {});
});
});
Cryptpad.onlyoffice.execCommand({
cmd: 'OPEN_CHANNEL',
data: {