fix(archive): missing id

This commit is contained in:
vulet 2020-07-03 22:45:15 +08:00
parent 59afdde7d4
commit 38ca35bdd4

View file

@ -75,7 +75,7 @@ const run = async (matrixClient, { roomId }, userInput, rearchive, registrar) =>
await sleep(10000); await sleep(10000);
const { title, date } = await archive(instance, userInput); const { title, date } = await archive(instance, userInput);
if (rearchive == false && title !== undefined) if (rearchive == false && title !== undefined)
return await editNoticeHTML(matrixClient, roomId, reply, arc2Str(`${config.domain}`, title, date)); return await editNoticeHTML(matrixClient, roomId, reply, arc2Str(`${config.domain}${id}`, title, date));
const { request: { path: reqPath }, headers: { 'memento-datetime': rearchiveDate } } = await instance({ method: 'HEAD', url: path[1] }) const { request: { path: reqPath }, headers: { 'memento-datetime': rearchiveDate } } = await instance({ method: 'HEAD', url: path[1] })
.catch(e => ({ request: { path: path[1] } })); .catch(e => ({ request: { path: path[1] } }));
if (rearchive == true && reqPath !== path[1]) if (rearchive == true && reqPath !== path[1])