Skip to content

Commit cb18868

Browse files
committed
fix: AI_Summary=False for user not in whitelist
1 parent 0d70ea8 commit cb18868

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

models/hole.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ func (holes Holes) Preprocess(c *fiber.Ctx) error {
293293

294294
// for users in whitelist or whitelist is empty, AISummaryAvailable is true,
295295
hole.AISummaryAvailable = config.Config.WhiteListUserIds == nil || slices.Contains(config.Config.WhiteListUserIds, uid)
296-
297-
hole.AISummaryAvailable = !(hole.Locked || hole.Hidden || hole.Frozen)
296+
hole.AISummaryAvailable = hole.AISummaryAvailable && !(hole.Locked || hole.Hidden || hole.Frozen)
298297
for _, tag := range hole.Tags {
299298
if len(tag.Name) > 0 && tag.Name[0] == '*' {
300299
hole.AISummaryAvailable = false

0 commit comments

Comments
 (0)