mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core&ui: add discussion history (#450)
Co-authored-by: 无限UCW <45730483+wuxianucw@users.noreply.github.com> Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
14 files changed
+227
-45
No files matched your search
@@ -254,4 +254,10 @@ export function apply(ctx: Context) {
|
||||
ctx.on('system/setting', () => triggerHotUpdate());
|
||||
ctx.on('app/watch/change', triggerHotUpdate);
|
||||
ctx.on('app/watch/unlink', triggerHotUpdate);
|
||||
ctx.on('handler/after/DiscussionRaw', async (that) => {
|
||||
if (that.args.render && that.response.type === 'text/markdown') {
|
||||
that.response.type = 'text/html';
|
||||
that.response.body = await markdown.render(that.response.body);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user