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

improve quest feedback email" #5666

Merged
merged 3 commits into from
Jan 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/marketing/mails.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,14 @@ def new_grant_admin(grant):

def send_user_feedback(quest, feedback, user):
to_email = quest.creator.email
from_email = user.email
from_email = settings.SERVER_EMAIL
cur_language = translation.get_language()
try:
setup_lang(to_email)
subject = f"New Gitcoin Quest Feedback: {quest.title}"
body_str = f"quest: {quest.title}\nurl: {quest.url}\nedit: {quest.edit_url}\n\n> {feedback}\n\nfrom: {user.email} ( {user.profile.url} )"
subject = f"Your Gitcoin Quest \"{quest.title}\" has feedback from another user!"
body_str = f("Your quest: {quest.title} has feedback from user {user.profile.handle}:\n\n"
"{feedback}\n\n"
"to edit your quest, click <a href=\"{quest.edit_url}\">here</a>")
body = f"{body_str}"
if not should_suppress_notification_email(to_email, 'quest'):
send_mail(
Expand Down