Skip to content

Commit

Permalink
fix relative attachment position
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomGuyJCI committed Oct 9, 2024
1 parent 7c2173a commit 1d2d802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orchard/scan/sources/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,16 @@ async def get_iids(self):
# check all attachments and corresponding number reactions. if no number reaction is found, then we ignore every attachment
ignore_all_attachments = True
attachment_numbers = []
relative_position = 0
relative_position = -1
for i, attachment in enumerate(post["attachments"]):
if attachment["filename"].endswith(".rdzip"):
relative_position += 1
if remove_attachments and await self.check_reaction(
post, number_reactions[relative_position]
):
ignore_all_attachments = False
continue
attachment_numbers.append(i)
relative_position += 1

if (not remove_attachments) or (not ignore_all_attachments):
for i in attachment_numbers:
Expand Down

0 comments on commit 1d2d802

Please sign in to comment.