mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
page_params: Add community_topic_editing_limit_seconds.
This was previously hardcoded with agreement between the Zulip backend and frontend as 86400 seconds (1 day). Now, it's still hardcoded in the backend, but arranged in a way where we could add a setting without any changes to the mobile and terminal apps to update logic. Fixes #15278.
This commit is contained in:
@@ -47,9 +47,9 @@ function is_topic_editable(message, edit_limit_seconds_buffer) {
|
||||
}
|
||||
|
||||
// If you're using community topic editing, there's a deadline.
|
||||
// TODO: Change hardcoded value (24 hrs) to be realm setting. Currently, it is
|
||||
// DEFAULT_COMMUNITY_TOPIC_EDITING_LIMIT_SECONDS
|
||||
return 86400 + edit_limit_seconds_buffer + now.diffSeconds(message.timestamp * 1000) > 0;
|
||||
return page_params.realm_community_topic_editing_limit_seconds
|
||||
+ edit_limit_seconds_buffer
|
||||
+ now.diffSeconds(message.timestamp * 1000) > 0;
|
||||
}
|
||||
|
||||
function get_editability(message, edit_limit_seconds_buffer) {
|
||||
|
||||
Reference in New Issue
Block a user