From ae6d0a0f85d01e50008a60fbc29d7cb224aacb1f Mon Sep 17 00:00:00 2001 From: Phorcys <57866459+phorcys420@users.noreply.github.com> Date: Tue, 29 Apr 2025 16:13:20 +0000 Subject: [PATCH] fix: fix "open" tag not being set when a member-set tag exists --- src/commands/util/walkthrough.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/util/walkthrough.ts b/src/commands/util/walkthrough.ts index fe16bae..9c351a7 100644 --- a/src/commands/util/walkthrough.ts +++ b/src/commands/util/walkthrough.ts @@ -40,8 +40,10 @@ export async function doWalkthrough( const threadChannel = channel as PublicThreadChannel; // necessary type cast, isHelpThread does the check already // Check for tags in the forum post - if (!threadChannel.appliedTags || threadChannel.appliedTags.length === 0) { - threadChannel.setAppliedTags([config.helpChannel.openedTag]); + const appliedTags = threadChannel.appliedTags ?? []; + if (!appliedTags.includes(config.helpChannel.openedTag)) { + appliedTags.push(config.helpChannel.openedTag); + threadChannel.setAppliedTags(appliedTags); } // Generate the message with the action row