Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filename of attachment #68

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wgresshoff
Copy link
Contributor

❤️ Thank you for your contribution!

Description

Please describe briefly your pull request.

Currently there is no possibility to set the name of an attachment. This PR will add the possibility.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@wgresshoff wgresshoff requested a review from ntarocco January 8, 2025 10:55
Comment on lines +86 to +88
filename = None
if "filename" in attachment:
filename = attachment.get("filename")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is None an accepted value by msg.attach for the filename?

Suggested change
filename = None
if "filename" in attachment:
filename = attachment.get("filename")
filename = attachment.get("filename")

Copy link
Contributor Author

@wgresshoff wgresshoff Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, None is accepted. But if you just call attachment.get("filename") and the key doesn't exist a KeyError will be raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants