Include a link button after the subject when it matches a realm filter.

This way if you refer to "trac #253" in the subject, it's super
convenient to get from your recipient bar to the ticket.

A note on performance: this part of rendering for 1000 messages takes
about 3.5ms for messages with 1 match; this is small compared to the
overall time for to_dict_uncached for that many message objects, so I
think this is OK for now.

(imported from commit 5bdc2b8415d7599d59eb554739f545c485b78d5a)
This commit is contained in:
Tim Abbott
2013-07-12 16:29:25 -04:00
parent dfeb40db61
commit 5fc6fb5896
6 changed files with 14 additions and 0 deletions

View File

@@ -974,6 +974,7 @@ def do_update_message(user_profile, message_id, subject, content):
event["orig_subject"] = message.subject
message.subject = subject
event["subject"] = subject
event['subject_links'] = bugdown.subject_links(message.sender.realm.domain.lower(), subject)
edit_history_event["prev_subject"] = event['orig_subject']
message.last_edit_time = timezone.now()