message-edit-history: Align overlay header with org setting.

If the organization has limited message history to moves only,
we display "MESSAGE MOVE HISTORY" for the overlay header, instead
of "MESSAGE EDIT HISTORY".
This commit is contained in:
Lauryn Menard 2025-03-14 21:14:11 +01:00 committed by Tim Abbott
parent 4fd3bb8aa5
commit 128539c283
2 changed files with 7 additions and 1 deletions

View File

@ -117,7 +117,9 @@ export function fetch_and_render_message_history(message: Message): void {
const move_history_only =
realm.realm_message_edit_history_visibility_policy ===
message_edit_history_visibility_policy_values.moves_only.code;
$("#message-edit-history-overlay-container").html(render_message_history_overlay());
$("#message-edit-history-overlay-container").html(
render_message_history_overlay({move_history_only}),
);
open_overlay();
show_loading_indicator();
void channel.get({

View File

@ -2,7 +2,11 @@
<div class="flex overlay-content">
<div class="message-edit-history-container overlay-messages-container overlay-container">
<div class="overlay-messages-header">
{{#if move_history_only}}
<h1>{{t "Message move history" }}</h1>
{{else}}
<h1>{{t "Message edit history" }}</h1>
{{/if}}
<div class="exit">
<span class="exit-sign">&times;</span>
</div>