-
-
Notifications
You must be signed in to change notification settings - Fork 104
Closed as not planned
Closed as not planned
Copy link
Labels
Description
This bug was probably introduced while switching over from the thread-based help system to the forum, as the threads could only be assigned a single category. The forum posts however can have multiple tags and so all category roles should be pinged accordingly, not just one, as you might not get added to a forum post which you subscribed to.
Responsible code in HelpThreadCreatedListener#sendHelperHeadsUp:
TJ-Bot/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadCreatedListener.java
Lines 100 to 113 in d2d6487
| String helperMention = helper.getCategoryTagOfChannel(threadChannel) | |
| .map(ForumTag::getName) | |
| .flatMap(category -> helper.handleFindRoleForCategory(category, | |
| threadChannel.getGuild())) | |
| .map(Role::getAsMention) | |
| .orElse(alternativeMention); | |
| // We want to invite all members of a role, but without hard-pinging them. However, | |
| // manually inviting them is cumbersome and can hit rate limits. | |
| // Instead, we abuse the fact that a role-ping through an edit will not hard-ping users, | |
| // but still invite them to a thread. | |
| String headsUpPattern = "%s please have a look, thanks."; | |
| String headsUpWithoutRole = headsUpPattern.formatted(alternativeMention); | |
| String headsUpWithRole = headsUpPattern.formatted(helperMention); |
This would need to be changed to support multiple category roles and a new method in HelpSystemHelper must be added to get all categories of the post.