implement more reliable check for whether a channel on the server is new

This commit is contained in:
ansuz
2017-12-22 16:24:17 +01:00
parent b6430d640e
commit 869909b101
5 changed files with 64 additions and 7 deletions

View File

@@ -252,6 +252,14 @@ define([
});
};
common.isNewChannel = function (href, cb) {
postMessage('IS_NEW_CHANNEL', {href: href}, function (obj) {
if (obj.error) { return void cb(obj.error); }
if (!obj) { return void cb('INVALID_RESPONSE'); }
cb(undefined, obj.isNew);
});
};
// Store