git.s-ol.nu fedidag / a986e6b
move DiscDAG discussion ids into /discdag/disc/:id s-ol 6 months ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
8484 const id = href.match(/cgi-bin\/DiscDAG.py\?DiscussionID=(.+)/)![1];
8585
8686 return {
87 id: `${PUBLIC_URL}/discdag/${id}`,
87 id: `${PUBLIC_URL}/discdag/disc/${id}`,
8888 type: 'Document',
8989 name: id,
9090 url: {
117117 });
118118 }))
119119
120 .get('/:discussion', wrap(async ($req, $res) => {
120 .get('/disc/:discussion', wrap(async ($req, $res) => {
121121 const { discussion } = $req.params;
122122 const { digest } = $req.cookies;
123123
154154 const nodeId = doc('title', node).text();
155155 const [_, time, author] = nodeId.split('_');
156156
157 const id = `${PUBLIC_URL}/discdag/${discussion}/${nodeId}`;
157 const id = `${PUBLIC_URL}/discdag/disc/${discussion}/${nodeId}`;
158158 first = first ?? id;
159159
160160 const content = doc('g:first text', node)
175175
176176 for (const node of doc('g.edge', 'svg')) {
177177 let [frm, to] = doc('title', node).text().split('->');
178 frm = `${PUBLIC_URL}/discdag/${discussion}/${frm}`;
179 to = `${PUBLIC_URL}/discdag/${discussion}/${to}`;
178 frm = `${PUBLIC_URL}/discdag/disc/${discussion}/${frm}`;
179 to = `${PUBLIC_URL}/discdag/disc/${discussion}/${to}`;
180180
181181 items[frm].replies.push(to);
182182 items[to].inReplyTo.push(frm);
193193 },
194194 },
195195 ],
196 id: `${PUBLIC_URL}/discdag/${discussion}`,
196 id: `${PUBLIC_URL}/discdag/disc/${discussion}`,
197197 type: 'Document',
198198 name: discussion,
199199 first,