mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
Add realm setting to disable message editing.
This is controlled through the admin tab and a new field in the Realms table. This mirrors the behavior of the old hardcoded setting feature_flags.disable_message_editing. Partially resolves #903.
This commit is contained in:
@@ -118,7 +118,7 @@ function message_hover(message_row) {
|
||||
message = current_msg_list.get(rows.id(message_row));
|
||||
message_unhover();
|
||||
message_row.addClass('message_hovered');
|
||||
if (message && message.sent_by_me && !message.status_message && !feature_flags.disable_message_editing) {
|
||||
if (message && message.sent_by_me && !message.status_message && page_params.realm_allow_message_editing) {
|
||||
message_row.find('.message_content').find('p:last').append(edit_content_button);
|
||||
}
|
||||
current_message_hover = message_row;
|
||||
@@ -479,7 +479,7 @@ $(function () {
|
||||
animation: false });
|
||||
|
||||
|
||||
if (feature_flags.disable_message_editing) {
|
||||
if (!page_params.realm_allow_message_editing) {
|
||||
$("#edit-message-hotkey-help").hide();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user