Skip to content

Commit f51f4b6

Browse files
authored
fix: fix "open" tag not being set when a member-set tag exists (#17)
1 parent 58967ae commit f51f4b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/commands/util/walkthrough.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export async function doWalkthrough(
4040
const threadChannel = channel as PublicThreadChannel; // necessary type cast, isHelpThread does the check already
4141

4242
// Check for tags in the forum post
43-
if (!threadChannel.appliedTags || threadChannel.appliedTags.length === 0) {
44-
threadChannel.setAppliedTags([config.helpChannel.openedTag]);
43+
const appliedTags = threadChannel.appliedTags ?? [];
44+
if (!appliedTags.includes(config.helpChannel.openedTag)) {
45+
appliedTags.push(config.helpChannel.openedTag);
46+
threadChannel.setAppliedTags(appliedTags);
4547
}
4648

4749
// Generate the message with the action row

0 commit comments

Comments
 (0)