mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-07 22:49:43 +01:00
Removed encoding to 'utf-8', breaks tests.
This needs to be looked into further.
This commit is contained in:
parent
4e2b7deefb
commit
8d63d65a7d
@ -553,7 +553,7 @@ def get_encoded_body(body: str) -> str:
|
|||||||
try:
|
try:
|
||||||
return body.encode('ascii').decode('unicode_escape')
|
return body.encode('ascii').decode('unicode_escape')
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
return body.encode('utf-8')
|
return body
|
||||||
|
|
||||||
|
|
||||||
def get_body_from_fragments(body) -> str:
|
def get_body_from_fragments(body) -> str:
|
||||||
@ -637,7 +637,8 @@ def object_from_message(message: str,
|
|||||||
if ticket_id is None and getattr(django_settings, 'HELPDESK_FULL_FIRST_MESSAGE_FROM_EMAIL', False):
|
if ticket_id is None and getattr(django_settings, 'HELPDESK_FULL_FIRST_MESSAGE_FROM_EMAIL', False):
|
||||||
# first message in thread, we save full body to avoid
|
# first message in thread, we save full body to avoid
|
||||||
# losing forwards and things like that
|
# losing forwards and things like that
|
||||||
body = EmailReplyParser.parse_reply(get_body_from_fragments(body))
|
full_body = get_body_from_fragments(body)
|
||||||
|
body = EmailReplyParser.parse_reply(body)
|
||||||
else:
|
else:
|
||||||
# second and other reply, save only first part of the
|
# second and other reply, save only first part of the
|
||||||
# message
|
# message
|
||||||
|
Loading…
Reference in New Issue
Block a user