Skip to content

Commit

Permalink
Sending files in threads (non-images) now work. resolves #2926
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Jan 6, 2021
1 parent c2b75dc commit a6ebd81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
- Blocked roles will no longer trigger an error during unblock.
- Custom emojis are now supported in `confirm_thread_creation_deny`. ([GH #2916](https://github.com/kyb3r/modmail/issues/2916))
- Finding linked messages in replies work now. ([GH #2920](https://github.com/kyb3r/modmail/issues/2920), [Jerrie-Aries](https://github.com/kyb3r/modmail/issues/2920#issuecomment-751530495))
- Sending files in threads (non-images) now work. ([GH #2926](https://github.com/kyb3r/modmail/issues/2926))

### Internal

Expand Down
5 changes: 3 additions & 2 deletions core/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,8 @@ async def reply(
"blocked by the recipient.")
else:
description = ("Your message could not be delivered due "
"to an unknown error. ")
"to an unknown error. Check `?debug` for "
"more information")
tasks.append(
message.channel.send(
embed=discord.Embed(
Expand Down Expand Up @@ -933,7 +934,7 @@ async def send(

file_upload_count = 1

for url, filename in attachments:
for url, filename, _ in attachments:
embed.add_field(
name=f"File upload ({file_upload_count})", value=f"[{filename}]({url})"
)
Expand Down

0 comments on commit a6ebd81

Please sign in to comment.