Skip to content

Commit

Permalink
cogs.log_analysis: Fix .txt attachment detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Penwy authored and derrod committed Nov 22, 2023
1 parent 3e23ac8 commit 1f0f0c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obsbot/cogs/public/log_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def on_filtered_message(self, msg: Message):
log_candidates = []
# message attachments
for attachment in msg.attachments:
if attachment.url.endswith('.txt'):
if urlparse(attachment.url).path.endswith('.txt'):
# collisions are possible here, but unlikely, we'll see if it becomes a problem
if not self.limiter.is_limited(attachment.filename):
log_candidates.append(attachment.url)
Expand Down

0 comments on commit 1f0f0c1

Please sign in to comment.