emails: address review feedback
This commit is contained in:
parent
c07a87a2b4
commit
2b92fded68
3 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
import logging
|
||||
import traceback
|
||||
import json
|
||||
import features
|
||||
|
||||
from flask.ext.mail import Message
|
||||
|
||||
|
@ -54,14 +55,14 @@ def send_email(recipient, subject, template_file, parameters, action=None):
|
|||
app_url = get_app_url()
|
||||
|
||||
def app_link_handler(url=None):
|
||||
return real_url = app_url + '/' + url if url else app_url
|
||||
return app_url + '/' + url if url else app_url
|
||||
|
||||
parameters.update({
|
||||
'subject': subject,
|
||||
'app_logo': 'https://quay.io/static/img/quay-logo.png', # TODO: make this pull from config
|
||||
'app_url': app_url,
|
||||
'app_title': app_title,
|
||||
'hosted': 'Quay' in app_title,
|
||||
'hosted': features.BILLING,
|
||||
'app_link': app_link_handler,
|
||||
'action_metadata': json.dumps(action.metadata) if action else None
|
||||
})
|
||||
|
|
Reference in a new issue