Only show edit subject hint on messages you sent.

(imported from commit 613a023bf22b07f879864690142e9d5e0a56f0ef)
This commit is contained in:
Jessica McKellar 2013-05-21 11:35:07 -04:00
parent 917f892def
commit 8609c59781
2 changed files with 9 additions and 6 deletions

View File

@ -523,10 +523,13 @@ function add_message_metadata(message, dummy) {
involved_people = [{'full_name': message.sender_full_name,
'email': message.sender_email}];
if (message.subject === compose.empty_subject_placeholder()) {
message.empty_subject = true;
if ((message.subject === compose.empty_subject_placeholder()) &&
(message.sender_email === page_params.email)) {
// You can only edit messages you sent, so only show the edit hint
// for empty subjects on messages you sent.
message.your_empty_subject = true;
} else {
message.empty_subject = false;
message.your_empty_subject = false;
}
break;
@ -716,9 +719,9 @@ function update_messages(events) {
msg.subject = event.subject;
if (msg.subject === compose.empty_subject_placeholder()) {
msg.empty_subject = true;
msg.your_empty_subject = true;
} else {
msg.empty_subject = false;
msg.your_empty_subject = false;
}
// Add the recent subjects entry for the new subject; must
// be called after we update msg.subject

View File

@ -38,7 +38,7 @@
&nbsp;<i class="icon-vector-narrow icon-vector-small"></i>&nbsp;
<span class="message_label_clickable narrows_by_subject"
title="Narrow to stream &quot;{{display_recipient}}&quot;, subject &quot;{{subject}}&quot;">{{#if ../../../../use_match_properties}}{{{match_subject}}}{{else}}{{subject}}{{/if}}</span>
{{#if empty_subject}}<i class="icon-vector-pencil edit_subject"></i>{{/if}}
{{#if your_empty_subject}}<i class="icon-vector-pencil edit_subject"></i>{{/if}}
</td>
</tr>
{{else}}