Skip to content

Commit

Permalink
Append a UUID to our contact email's subject line, to help with threa…
Browse files Browse the repository at this point in the history
…ding.
  • Loading branch information
rebeccacremona committed Oct 10, 2023
1 parent 01f50a0 commit 9263d9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions perma_web/perma/views/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from io import StringIO
from link_header import Link as Rel, LinkHeader
from urllib.parse import urlencode
import uuid
from timegate.utils import closest
from warcio.timeutils import datetime_to_http_date
from werkzeug.http import parse_date
Expand Down Expand Up @@ -393,7 +394,7 @@ def handle_registrar_fields(form):
if form.is_valid():
# Assemble info for email
from_address = form.cleaned_data['email']
subject = "[perma-contact] " + form.cleaned_data['subject']
subject = f"[perma-contact] {form.cleaned_data['subject']} ({str(uuid.uuid4())})"
context = {
"message": form.cleaned_data['box2'],
"from_address": from_address,
Expand Down Expand Up @@ -499,7 +500,7 @@ def affiliation_string():
if form.is_valid():
if form.cleaned_data['guid']:
from_address = form.cleaned_data['email']
subject = "[perma-contact] Reporting Inappropriate Content"
subject = f"[perma-contact] Reporting Inappropriate Content ({str(uuid.uuid4())})"
context = {
"reason": form.cleaned_data['reason'],
"source": form.cleaned_data['source'],
Expand Down

0 comments on commit 9263d9f

Please sign in to comment.