mirror of https://github.com/zulip/zulip.git
Only show edit subject hint on messages you sent.
(imported from commit 613a023bf22b07f879864690142e9d5e0a56f0ef)
This commit is contained in:
parent
917f892def
commit
8609c59781
|
@ -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
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<i class="icon-vector-narrow icon-vector-small"></i>
|
||||
<span class="message_label_clickable narrows_by_subject"
|
||||
title="Narrow to stream "{{display_recipient}}", subject "{{subject}}"">{{#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}}
|
||||
|
|
Loading…
Reference in New Issue