Improve error message when opening an expired pad

pull/1/head
yflory 4 years ago
parent 163c6556a0
commit 74b379999e

@ -288,7 +288,15 @@ define([
var newHref; var newHref;
var expire; var expire;
nThen(function (w) { nThen(function (w) {
if (parsed.hashData.key || !parsed.hashData.channel) { return; } // If we're using an unsafe link, get pad attribute
if (parsed.hashData.key || !parsed.hashData.channel) {
Cryptpad.getPadAttribute('expire', w(function (err, data) {
if (err) { return; }
expire = data;
}));
return;
}
// Otherwise, get pad data from channel id
var edit = parsed.hashData.mode === 'edit'; var edit = parsed.hashData.mode === 'edit';
Cryptpad.getPadDataFromChannel({ Cryptpad.getPadDataFromChannel({
channel: parsed.hashData.channel, channel: parsed.hashData.channel,

Loading…
Cancel
Save