1
0
mirror of synced 2026-08-05 23:36:55 +00:00

FIX: Use base 10 when gettings allowed group IDs from settings. (#113)

A missing parameter on the `parseInt` function was causing unexpected UI behavior for the AI helper since it turned an allowed group ID into NaN. We should always use base10 when parsing these IDs.
This commit is contained in:
Roman Rizzi
2023-07-24 11:29:49 -03:00
committed by GitHub
parent 3f05d3a732
commit 79289ba231
2 changed files with 2 additions and 2 deletions
@@ -149,7 +149,7 @@ export default {
const aiBotsAllowedGroups = settings.ai_bot_allowed_groups
.split("|")
.map(parseInt);
.map((id) => parseInt(id, 10));
const canInteractWithAIBots = user?.groups.some((g) =>
aiBotsAllowedGroups.includes(g.id)
);
@@ -60,7 +60,7 @@ export default {
const allowedGroups = settings.ai_helper_allowed_groups
.split("|")
.map(parseInt);
.map((id) => parseInt(id, 10));
const canUseAssistant = user?.groups.some((g) =>
allowedGroups.includes(g.id)
);