forked from extern/django-helpdesk
Merge branch 'main' into stable
This commit is contained in:
commit
dc6db21368
@ -499,6 +499,11 @@ def create_object_from_email_message(message, ticket_id, payload, files, logger)
|
||||
logger.info(
|
||||
"Message seems to be auto-reply, not sending any emails back to the sender")
|
||||
else:
|
||||
send_info_email(message_id, f, ticket, context, queue, new)
|
||||
return ticket
|
||||
|
||||
|
||||
def send_info_email(message_id: str, f: FollowUp, ticket: Ticket, context: dict, queue: dict, new: bool):
|
||||
# send mail to appropriate people now depending on what objects
|
||||
# were created and who was CC'd
|
||||
# Add auto-reply headers because it's an auto-reply and we must
|
||||
@ -531,8 +536,6 @@ def create_object_from_email_message(message, ticket_id, payload, files, logger)
|
||||
extra_headers=extra_headers,
|
||||
)
|
||||
|
||||
return ticket
|
||||
|
||||
|
||||
def get_ticket_id_from_subject_slug(
|
||||
queue_slug: str,
|
||||
|
@ -81,12 +81,12 @@ def text_is_spam(text, request):
|
||||
# This will return 'True' is the given text is deemed to be spam, or
|
||||
# False if it is not spam. If it cannot be checked for some reason, we
|
||||
# assume it isn't spam.
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
try:
|
||||
from akismet import Akismet
|
||||
except ImportError:
|
||||
return False
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
try:
|
||||
site = Site.objects.get_current()
|
||||
except ImproperlyConfigured:
|
||||
|
Loading…
Reference in New Issue
Block a user