stash
This commit is contained in:
parent
aa87e70a73
commit
6a4e881051
2 changed files with 9 additions and 3 deletions
|
@ -29,7 +29,9 @@ SECRET_KEY = 'django-insecure-tm*$w_14iqbiy-!7(8#ba7j+_@(7@rf2&a^!=shs&$03b%2*rv
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = [os.getenv('HTTP_HOST', 'localhost')]
|
||||
PRIMARY_HOST = os.getenv('HTTP_HOST', 'localhost')
|
||||
|
||||
ALLOWED_HOSTS = [PRIMARY_HOST]
|
||||
|
||||
MAIL_DOMAIN = os.getenv('MAIL_DOMAIN', 'localhost')
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import aiosmtplib
|
|||
from channels.layers import get_channel_layer
|
||||
from channels.db import database_sync_to_async
|
||||
from django.core.files.base import ContentFile
|
||||
|
||||
from core.settings import PRIMARY_HOST
|
||||
from mail.models import Email, EventAddress, EmailAttachment
|
||||
from notify_sessions.models import SystemEvent
|
||||
from tickets.models import IssueThread
|
||||
|
@ -255,9 +257,11 @@ Your c3lf (Cloakroom + Lost&Found) Team'''.format(active_issue_thread.short_uuid
|
|||
else:
|
||||
notify_subject = active_issue_thread.name
|
||||
if new:
|
||||
notification = f"New issue \"{active_issue_thread.name}\" [{active_issue_thread.short_uuid()}] created by {sender}"
|
||||
notification = f"""New issue \"{active_issue_thread.name}\" [{active_issue_thread.short_uuid()}] created
|
||||
see https://{PRIMARY_HOST}/{target_event.slug}/ticket/{active_issue_thread.short_uuid.id}/"""
|
||||
else:
|
||||
notification = f"Reply to issue \"{active_issue_thread.name}\" [{active_issue_thread.short_uuid()}] by {sender}"
|
||||
notification = f"""Reply to issue \"{active_issue_thread.name}\" [{active_issue_thread.short_uuid()}]
|
||||
see https://{PRIMARY_HOST}/{target_event.slug}/ticket/{active_issue_thread.short_uuid.id}/"""
|
||||
|
||||
return email, new, reply, notification
|
||||
|
||||
|
|
Loading…
Reference in a new issue