Skip to content

Commit

Permalink
Fixed subject line when sending email
Browse files Browse the repository at this point in the history
  • Loading branch information
angcast committed Dec 10, 2020
1 parent 7c07ea9 commit 7261e87
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions browser/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ def load_thread(request):
@login_required
def insert_post(request):
try:
logger.debug("insert post")
user = get_object_or_404(UserProfile, email=request.user.email)

group_name = request.POST['group_name']
Expand All @@ -831,7 +830,7 @@ def insert_post(request):
subj_tag += '[%s]' % tag['name']

stripped_subj = re.sub("\[.*?\]", "", request.POST['subject'])
subject = '[%s]%s %s' %(friendly_name, subj_tag, stripped_subj)
subject = '[%s]%s %s' %( friendly_name if friendly_name != '' else group_name, subj_tag, stripped_subj)


msg_id = res['msg_id']
Expand Down

0 comments on commit 7261e87

Please sign in to comment.