make the 'last_activity' field in /tickets show the actual last activity by making it a virtual field
This commit is contained in:
parent
9aeb6a319f
commit
1804939407
7 changed files with 135 additions and 6 deletions
|
@ -158,8 +158,8 @@ def receive_email(envelope, log=None):
|
|||
log.warning("Header to does not match envelope to")
|
||||
log.info(f"Header to: {header_to}, envelope to: {envelope.rcpt_tos[0]}")
|
||||
|
||||
recipient = envelope.rcpt_tos[0].lower()
|
||||
sender = envelope.mail_from
|
||||
recipient = envelope.rcpt_tos[0].lower() if envelope.rcpt_tos else header_to.lower()
|
||||
sender = envelope.mail_from if envelope.mail_from else header_from
|
||||
subject = parsed.get('Subject')
|
||||
subject = unescape_and_decode_quoted_printable(subject)
|
||||
subject = unescape_and_decode_base64(subject)
|
||||
|
@ -188,7 +188,7 @@ def receive_email(envelope, log=None):
|
|||
in_reply_to=header_message_id, event=target_event, issue_thread=active_issue_thread)
|
||||
reply = make_reply(reply_email, references)
|
||||
else:
|
||||
#change state if not new
|
||||
# change state if not new
|
||||
if active_issue_thread.state != 'pending_new':
|
||||
active_issue_thread.state = 'pending_open'
|
||||
active_issue_thread.save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue