|
|
@ -1470,6 +1470,11 @@ define([
|
|
|
|
Store.getPadMetadata(null, {
|
|
|
|
Store.getPadMetadata(null, {
|
|
|
|
channel: data.channel
|
|
|
|
channel: data.channel
|
|
|
|
}, waitFor(function (md) {
|
|
|
|
}, waitFor(function (md) {
|
|
|
|
|
|
|
|
if (md && md.rejected) {
|
|
|
|
|
|
|
|
postMessage(clientId, "PAD_ERROR", {type: "ERESTRICTED"});
|
|
|
|
|
|
|
|
waitFor.abort();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
validateKey = md.validateKey;
|
|
|
|
validateKey = md.validateKey;
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}).nThen(function () {
|
|
|
|
}).nThen(function () {
|
|
|
@ -1482,6 +1487,11 @@ define([
|
|
|
|
postMessage(clientId, "PAD_ERROR", obj.error);
|
|
|
|
postMessage(clientId, "PAD_ERROR", obj.error);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var msgs = obj.messages || [];
|
|
|
|
|
|
|
|
if (msgs.length && msgs[msgs.length - 1].serverHash !== data.versionHash) {
|
|
|
|
|
|
|
|
postMessage(clientId, "PAD_ERROR", {type: "HASH_NOT_FOUND"});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
postMessage(clientId, "PAD_CONNECT", {
|
|
|
|
postMessage(clientId, "PAD_CONNECT", {
|
|
|
|
myID: fakeNetflux,
|
|
|
|
myID: fakeNetflux,
|
|
|
|
id: data.channel,
|
|
|
|
id: data.channel,
|
|
|
|