Skip to content

Commit be44163

Browse files
committed
Ignore both archived and locked posts when archiving idle
For some reason a thread with .closed=True was getting past this if statement. See https://python-discord.sentry.io/issues/6281905188 and the value for post in the stack frame
1 parent c6fd024 commit be44163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/exts/help_channels/_channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ async def maybe_archive_idle_post(post_id: int, scheduler: scheduling.Scheduler)
198198
log.trace(f"Not closing missing post #{post} ({post.id}).")
199199
return
200200

201-
if post.locked:
201+
if post.archived or post.locked:
202202
log.trace(f"Not closing already closed post #{post} ({post.id}).")
203203
return
204204

0 commit comments

Comments
 (0)