From fb0bdc779e4c0f4e969ca042d89df422a75031f8 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 28 Aug 2021 23:47:28 -0600 Subject: [PATCH] refactor the jump link production in order to have it use the link when we aren't creating a thread. --- src/endpoints/management/is_tied.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/endpoints/management/is_tied.ts b/src/endpoints/management/is_tied.ts index 3ef4d04..42eaf6d 100644 --- a/src/endpoints/management/is_tied.ts +++ b/src/endpoints/management/is_tied.ts @@ -65,7 +65,16 @@ export default { // Add link if we know what channel the message was posted in let use_jump_link = config.guilds[gID].include_jump_link_for_threads ?? true; - if (db[gID].bracket.channel && (use_jump_link && params.thread_id)) { + if ( + db[gID].bracket.channel + && ( + !try_thread + || ( + use_jump_link + || !params.thread_id + ) + ) + ) { content += `\n\n[Jump To Bracket](https://discord.com/channels/${gID}/${bracket.channel}/${bracket.msg})` };